Fri, 19 Aug 2022 01:00:48 -0500
Fix leaks from GtkFileChooser results
The return value of `gtk_file_chooser_get_file` and `g_file_get_path` are both transfer full, so they must be freed.
Testing Done:
Compiled only.
Reviewed at https://reviews.imfreedom.org/r/1610/
|
41510
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Finch - Universal Text Chat Client |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Finch is the legal property of its developers, whose names are too numerous |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(FINCH_GLOBAL_HEADER_INSIDE) && !defined(FINCH_COMPILATION) |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <finch.h> may be included directly" |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef FINCH_NOTIFICATIONS_H |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define FINCH_NOTIFICATIONS_H |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <purple.h> |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | G_BEGIN_DECLS |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | /** |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | * finch_notifications_init: |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | * |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * Perform necessary initializations. |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * Since: 3.0.0 |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | */ |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | void finch_notifications_init(void); |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | /** |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * finch_notifications_uninit: |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | * Perform necessary uninitialization. |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | */ |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | void finch_notifications_uninit(void); |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | /** |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * finch_notifications_window_show: |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | * |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | * Show the notifications window. |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | */ |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | void finch_notifications_window_show(void); |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | G_END_DECLS |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | #endif /* FINCH_NOTIFICATIONS_H */ |
|
630da93b9984
Implement notifications in Finch
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 |