diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2006-12-17 11:50:39 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2006-12-17 11:50:39 +0000 |
commit | 83fb9465101b5d4710728d4b8af4631248d14f2d (patch) | |
tree | fbc913254179c12ff2ee9589a15274e15537b0f0 | |
parent | deb014d138e9d8a4101fa83c8602779fb10e945c (diff) | |
download | libgphoto2-83fb9465101b5d4710728d4b8af4631248d14f2d.tar.gz |
fixed memory leak during Canon/Nikon Capture
git-svn-id: https://svn.code.sf.net/p/gphoto/code/branches/libgphoto2-2_3/libgphoto2@9630 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r-- | camlibs/ptp2/ChangeLog | 6 | ||||
-rw-r--r-- | camlibs/ptp2/library.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/camlibs/ptp2/ChangeLog b/camlibs/ptp2/ChangeLog index a1b82cd7e..6e24ad604 100644 --- a/camlibs/ptp2/ChangeLog +++ b/camlibs/ptp2/ChangeLog @@ -1,3 +1,9 @@ +2006-12-17 Marcus Meissner <marcus@jet.franken.de> + + * library.c: Fixed leaking CameraFile + data on Canon and Nikon + capture. + * library.c: Added HP Photosmart E427 + 2006-12-10 Marcus Meissner <marcus@jet.franken.de> * Makefile.am: Link against libiconv if necessary. diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 2600f61bd..f25f8aed2 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -391,6 +391,8 @@ static struct { /* http://sourceforge.net/tracker/index.php?func=detail&aid=1584447&group_id=8874&atid=358874 */ {"HP:PhotoSmart R927 (PTP mode)", 0x03f0, 0x8702, 0}, {"HP:PhotoSmart E327 (PTP mode)", 0x03f0, 0x8b02, 0}, + /* https://sourceforge.net/tracker/?func=detail&atid=358874&aid=1589879&group_id=8874 */ + {"HP:PhotoSmart E427 (PTP mode)", 0x03f0, 0x8c02, 0}, /* Most Sony PTP cameras use the same product/vendor IDs. */ {"Sony:PTP", 0x054c, 0x004e, 0}, @@ -1316,6 +1318,9 @@ add_objectid_to_gphotofs(Camera *camera, CameraFilePath *path, GPContext *contex ret = gp_filesystem_set_file_noop(camera->fs, path->folder, file, context); if (ret != GP_OK) return ret; + /* We have now handed over the file, disclaim responsibility by unref. */ + gp_file_unref (file); + /* we also get the fs info for free, so just set it */ info.file.fields = GP_FILE_INFO_TYPE | GP_FILE_INFO_NAME | GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT | |