Closed GoogleCodeExporter closed 9 years ago
这个问题已经解决了,主要原因是,数组初始化使用了变量��
�修复如下:
157 - char buf[file_size];
158 - memset(buf, 0, file_size);
159 - bs_file_t file = storage->bs_file_open(storage, SNAPSHOT_FILE,
BS_READONLY);
164 + char *buf = (char *)g_malloc0(sizeof(char) * file_size);
165 + if (NULL == buf) {
166 + HLOG_ERROR("Allocate error!");
167 + ret = -1;
168 + goto out1;
169 + }
170 + bs_file_t file = NULL;
171 + file = storage->bs_file_open(storage, SNAPSHOT_FILE, BS_READONLY);
同时我也对snapshot_helper.c文件中,资源释进行了fix,详见如下
链接
http://code.google.com/p/cloudxy/source/detail?r=278#
Original comment by harryxi...@gmail.com
on 1 Jan 2012 at 6:55
Original issue reported on code.google.com by
harryxi...@gmail.com
on 1 Jan 2012 at 4:09