diff options
author | Moon <moon@140774ce-b5e7-0310-ab8b-a85725594a96> | 2008-06-11 09:22:36 +0000 |
---|---|---|
committer | Moon <moon@140774ce-b5e7-0310-ab8b-a85725594a96> | 2008-06-11 09:22:36 +0000 |
commit | bba41f55b3f3cc77982b1dbe35d3a1cbc143fdfc (patch) | |
tree | 3adfb539af23a782fa8d63cf0ef55165a7393c45 | |
parent | 1fbd05b0963ba23d522d4e4661e257ec51a62f80 (diff) | |
download | gnunet-gtk-bba41f55b3f3cc77982b1dbe35d3a1cbc143fdfc.tar.gz gnunet-gtk-bba41f55b3f3cc77982b1dbe35d3a1cbc143fdfc.zip |
fix leak
-rw-r--r-- | src/plugins/fs/search.c | 6 | ||||
-rw-r--r-- | src/plugins/fs/status.c | 2 | ||||
-rw-r--r-- | src/plugins/fs/status.h | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/fs/search.c b/src/plugins/fs/search.c index ce3c5bcf..19cea88a 100644 --- a/src/plugins/fs/search.c +++ b/src/plugins/fs/search.c | |||
@@ -191,6 +191,7 @@ addEntryToSearchTree (SearchList * searchContext, | |||
191 | char *size_h; | 191 | char *size_h; |
192 | GdkPixbuf *pixbuf; | 192 | GdkPixbuf *pixbuf; |
193 | GdkPixbuf *rankbuf; | 193 | GdkPixbuf *rankbuf; |
194 | GdkPixbuf *statusLogo; | ||
194 | #ifdef HAVE_GIO | 195 | #ifdef HAVE_GIO |
195 | GdkPixbuf *icon = NULL; | 196 | GdkPixbuf *icon = NULL; |
196 | GIcon *gicon = NULL; | 197 | GIcon *gicon = NULL; |
@@ -202,6 +203,7 @@ addEntryToSearchTree (SearchList * searchContext, | |||
202 | state = GNUNET_URITRACK_get_state (ectx, cfg, info->uri); | 203 | state = GNUNET_URITRACK_get_state (ectx, cfg, info->uri); |
203 | rawMime = getMimeTypeFromMetaData (info->meta); | 204 | rawMime = getMimeTypeFromMetaData (info->meta); |
204 | desc = getDescriptionFromMetaData (info->meta); | 205 | desc = getDescriptionFromMetaData (info->meta); |
206 | statusLogo = getStatusLogo (state); | ||
205 | name = getFileNameFromMetaData (info->meta); | 207 | name = getFileNameFromMetaData (info->meta); |
206 | size = GNUNET_ECRS_uri_test_chk (info->uri) | 208 | size = GNUNET_ECRS_uri_test_chk (info->uri) |
207 | || GNUNET_ECRS_uri_test_loc (info->uri) ? | 209 | || GNUNET_ECRS_uri_test_loc (info->uri) ? |
@@ -251,7 +253,7 @@ addEntryToSearchTree (SearchList * searchContext, | |||
251 | SEARCH_INTERNAL,searchContext, | 253 | SEARCH_INTERNAL,searchContext, |
252 | SEARCH_INTERNAL_PARENT, downloadParent, | 254 | SEARCH_INTERNAL_PARENT, downloadParent, |
253 | SEARCH_STATUS, getStatusName (state), | 255 | SEARCH_STATUS, getStatusName (state), |
254 | SEARCH_STATUS_LOGO, getStatusLogo (state), | 256 | SEARCH_STATUS_LOGO, statusLogo, |
255 | SEARCH_APPLICABILITY_RANK, 1, SEARCH_RANK_SORT, | 257 | SEARCH_APPLICABILITY_RANK, 1, SEARCH_RANK_SORT, |
256 | (long long) 1, SEARCH_RANK_PIXBUF, rankbuf, | 258 | (long long) 1, SEARCH_RANK_PIXBUF, rankbuf, |
257 | #ifdef HAVE_GIO | 259 | #ifdef HAVE_GIO |
@@ -261,6 +263,8 @@ addEntryToSearchTree (SearchList * searchContext, | |||
261 | g_object_unref (rankbuf); | 263 | g_object_unref (rankbuf); |
262 | if (pixbuf != NULL) | 264 | if (pixbuf != NULL) |
263 | g_object_unref (pixbuf); | 265 | g_object_unref (pixbuf); |
266 | if (statusLogo != NULL) | ||
267 | g_object_unref (statusLogo); | ||
264 | #ifdef HAVE_GIO | 268 | #ifdef HAVE_GIO |
265 | if (gicon != NULL) | 269 | if (gicon != NULL) |
266 | g_object_unref (gicon); | 270 | g_object_unref (gicon); |
diff --git a/src/plugins/fs/status.c b/src/plugins/fs/status.c index 568a56b1..f8cf9370 100644 --- a/src/plugins/fs/status.c +++ b/src/plugins/fs/status.c | |||
@@ -75,7 +75,7 @@ getStatusName (enum GNUNET_URITRACK_STATE state) | |||
75 | return ""; | 75 | return ""; |
76 | } | 76 | } |
77 | 77 | ||
78 | const GdkPixbuf * | 78 | GdkPixbuf * |
79 | getStatusLogo (enum GNUNET_URITRACK_STATE state) | 79 | getStatusLogo (enum GNUNET_URITRACK_STATE state) |
80 | { | 80 | { |
81 | if (state & (GNUNET_URITRACK_DIRECTORY_ADDED)) | 81 | if (state & (GNUNET_URITRACK_DIRECTORY_ADDED)) |
diff --git a/src/plugins/fs/status.h b/src/plugins/fs/status.h index 60f4ea6e..4726a0c4 100644 --- a/src/plugins/fs/status.h +++ b/src/plugins/fs/status.h | |||
@@ -35,6 +35,6 @@ const char *getColorCode (enum GNUNET_URITRACK_STATE state); | |||
35 | 35 | ||
36 | const char *getStatusName (enum GNUNET_URITRACK_STATE state); | 36 | const char *getStatusName (enum GNUNET_URITRACK_STATE state); |
37 | 37 | ||
38 | const GdkPixbuf *getStatusLogo (enum GNUNET_URITRACK_STATE state); | 38 | GdkPixbuf *getStatusLogo (enum GNUNET_URITRACK_STATE state); |
39 | 39 | ||
40 | #endif | 40 | #endif |