Codebase list xapp / df51377
favorites: Fix some leaks revealed by valgrind. Michael Webster 3 years ago
3 changed file(s) with 11 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
287287 g_object_unref (file);
288288 }
289289
290 g_list_free (added);
291 g_list_free (removed);
292
290293 GList *tmp = priv->infos;
291294 priv->infos = new_infos;
292295
375375 {
376376 if (!priv->info->uri)
377377 {
378 if (error != NULL)
379 {
380 *error = g_error_new (G_IO_ERROR, G_IO_ERROR_NOT_FOUND, "File not found");
381 }
378 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, "File not found");
382379 return NULL;
383380 }
384381
527524
528525 g_file_attribute_matcher_unref (matcher);
529526 }
530
531 if (error)
532 {
533 *error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "Can't retrieve info for favorite file");
534 }
535
536 return info; // NULL
527 else
528 {
529 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Can't retrieve info for favorite file");
530 }
531
532 return info;
537533 }
538534
539535 GFileInfo *
265265
266266 g_debug ("XAppFavorites: store_favorites: favorites saved");
267267
268 g_free (new_settings);
268 g_strfreev (new_settings);
269269 }
270270
271271 static void