41db92e60a60d06c2c2377a28777170eff64163d
[openwrt/svn-archive/archive.git] / libs / libgphoto2 / patches / 030-memleaks.patch
1 diff -ruN libgphoto2-2.2.1-old/camlibs/ptp2/library.c libgphoto2-2.2.1-new/camlibs/ptp2/library.c
2 --- libgphoto2-2.2.1-old/camlibs/ptp2/library.c 2006-06-16 07:08:21.000000000 +0200
3 +++ libgphoto2-2.2.1-new/camlibs/ptp2/library.c 2006-12-17 16:15:03.000000000 +0100
4 @@ -1242,6 +1242,9 @@
5 ret = gp_filesystem_set_file_noop(camera->fs, path->folder, file, context);
6 if (ret != GP_OK) return ret;
7
8 + /* We have now handed over the file, disclaim responsibility by unref. */
9 + gp_file_unref (file);
10 +
11 /* we also get the fs info for free, so just set it */
12 info.file.fields = GP_FILE_INFO_TYPE | GP_FILE_INFO_NAME |
13 GP_FILE_INFO_WIDTH | GP_FILE_INFO_HEIGHT |