diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2013-05-01 12:04:07 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2013-05-01 12:04:07 +0000 |
commit | 826ac6fc62275f5fa820b945868e42e3bdb7a91b (patch) | |
tree | d27edf1971d1d0b39ce650c9810321d64aab4629 /camlibs/canon | |
parent | e89764b17a38b46df13d0f0acb50c1c836da0e81 (diff) | |
download | libgphoto2-826ac6fc62275f5fa820b945868e42e3bdb7a91b.tar.gz |
free packet on error path
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14374 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/canon')
-rw-r--r-- | camlibs/canon/usb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/camlibs/canon/usb.c b/camlibs/canon/usb.c index 109ea665d..c8b7e94ff 100644 --- a/camlibs/canon/usb.c +++ b/camlibs/canon/usb.c @@ -2313,7 +2313,11 @@ canon_usb_put_file (Camera *camera, CameraFile *file, } GP_DEBUG ( "canon_put_file_usb: converting file name" ); - CHECK_RESULT (gp_file_get_name (file, &srcname)); + status = gp_file_get_name (file, &srcname) + if (status < GP_OK) { + free (packet); + return status; + } /* Open input file and read all its data into a buffer. */ if(!gp_file_get_data_and_size (file, (const char **)&data, &size)) { |