From: Nicolas Thill Date: Sun, 17 Dec 2006 15:45:25 +0000 (+0000) Subject: add patch suggested by alesan to fix memleaks (closes: #1063) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=560211555b5b8eaf763fb536f4c494aa079466d3;p=openwrt%2Fsvn-archive%2Farchive.git add patch suggested by alesan to fix memleaks (closes: #1063) SVN-Revision: 5823 --- diff --git a/libs/libgphoto2/patches/030-memleaks.patch b/libs/libgphoto2/patches/030-memleaks.patch new file mode 100644 index 0000000000..41db92e60a --- /dev/null +++ b/libs/libgphoto2/patches/030-memleaks.patch @@ -0,0 +1,13 @@ +diff -ruN libgphoto2-2.2.1-old/camlibs/ptp2/library.c libgphoto2-2.2.1-new/camlibs/ptp2/library.c +--- libgphoto2-2.2.1-old/camlibs/ptp2/library.c 2006-06-16 07:08:21.000000000 +0200 ++++ libgphoto2-2.2.1-new/camlibs/ptp2/library.c 2006-12-17 16:15:03.000000000 +0100 +@@ -1242,6 +1242,9 @@ + 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 |