forked from enlightenment/ephoto
Ephoto: Fix coverity issues: CIDS 151514 151512
This commit is contained in:
parent
621fb3be0b
commit
38c246b000
|
@ -1160,11 +1160,8 @@ ephoto_directory_browser_initialize_structure(Ephoto *ephoto)
|
||||||
dir = strdup(path);
|
dir = strdup(path);
|
||||||
while (strcmp(dir, ephoto->config->open))
|
while (strcmp(dir, ephoto->config->open))
|
||||||
{
|
{
|
||||||
if (dir)
|
free(dir);
|
||||||
{
|
dir = NULL;
|
||||||
free(dir);
|
|
||||||
dir = NULL;
|
|
||||||
}
|
|
||||||
dir = ecore_file_dir_get(path);
|
dir = ecore_file_dir_get(path);
|
||||||
dirs = eina_list_prepend(dirs, strdup(dir));
|
dirs = eina_list_prepend(dirs, strdup(dir));
|
||||||
memset(path, 0x00, sizeof(path));
|
memset(path, 0x00, sizeof(path));
|
||||||
|
|
|
@ -939,7 +939,7 @@ _prompt_upload_apply(void *data, Evas_Object *obj EINA_UNUSED,
|
||||||
rewind(f);
|
rewind(f);
|
||||||
fdata = malloc(fsize);
|
fdata = malloc(fsize);
|
||||||
res = fread(fdata, fsize, 1, f);
|
res = fread(fdata, fsize, 1, f);
|
||||||
if (res < 1) CRIT("fread() failed on file '%s': %s", entry->path, strerror(errno));
|
if (res < 1) CRIT("fread() failed on file '%s': %s", entry->path, strerror(errno));
|
||||||
res = fclose(f);
|
res = fclose(f);
|
||||||
if (!res) CRIT("fclose() failed on file '%s': %s", entry->path, strerror(errno));
|
if (!res) CRIT("fclose() failed on file '%s': %s", entry->path, strerror(errno));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue