check return value for error (Coverity)

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14667 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2014-01-06 13:39:23 +00:00
parent 28948bd7cf
commit de5950c8f2

View File

@@ -256,6 +256,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
len = ez200_get_picture_size (camera->port, n);
GP_DEBUG("len = %i", len);
if (len < GP_OK) return len;
data = (char *)malloc(len + HEADER_SIZE + 1);
if (!data) return GP_ERROR_NO_MEMORY;