summaryrefslogtreecommitdiff
path: root/camlibs/ricoh
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2014-09-21 12:58:15 +0000
committerMarcus Meissner <marcus@jet.franken.de>2014-09-21 12:58:15 +0000
commit88ab63065d96a9b487141f4117dd55820f492dac (patch)
tree18a6784c3fb7355901d34e53f5b3e91f6264c014 /camlibs/ricoh
parent422c67480367b4eea909185528c8d8d54455ea56 (diff)
downloadlibgphoto2-88ab63065d96a9b487141f4117dd55820f492dac.tar.gz
free (NULL) works nicely on good systems, also cmd is checked for NULL
usually (cocinelle) git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15188 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/ricoh')
-rw-r--r--camlibs/ricoh/g3.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/camlibs/ricoh/g3.c b/camlibs/ricoh/g3.c
index ba6ef3cee..1f7a9a9fb 100644
--- a/camlibs/ricoh/g3.c
+++ b/camlibs/ricoh/g3.c
@@ -485,8 +485,8 @@ delete_file_func (CameraFilesystem *fs, const char *folder,
ret = GP_ERROR;
}
out:
- if (cmd) free(cmd);
- if (reply) free(reply);
+ free(cmd);
+ free(reply);
return (GP_OK);
}
@@ -513,8 +513,8 @@ rmdir_func (CameraFilesystem *fs, const char *folder,
ret = GP_ERROR;
}
out:
- if (cmd) free(cmd);
- if (reply) free(reply);
+ free(cmd);
+ free(reply);
return (GP_OK);
}
@@ -541,8 +541,8 @@ mkdir_func (CameraFilesystem *fs, const char *folder,
ret = GP_ERROR;
}
out:
- if (cmd) free(cmd);
- if (reply) free(reply);
+ free(cmd);
+ free(reply);
return (GP_OK);
}
@@ -606,7 +606,7 @@ camera_summary (Camera *camera, CameraText *summary, GPContext *context)
sprintf(t+strlen(t), _("Internal memory: %d MB total, %d MB free.\n"), space/1024/1024, sfree/1024/1024);
}
}
- if (buf) free (buf);
+ free (buf);
return (GP_OK);
}
@@ -688,7 +688,7 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *filename,
}
}
out:
- if (reply) free(reply);
+ free(reply);
free(cmd);
return (GP_OK);