[balsa] Terminate the vector of strings with a NULL pointer
- From: Pawel Salek <pawels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Terminate the vector of strings with a NULL pointer
- Date: Sun, 27 Dec 2020 11:09:13 +0000 (UTC)
commit dbcbb59a9e9dbbcb20edd552969134abf9d5ce39
Author: Pawel Salek <pawsa0 gmail com>
Date: Sun Dec 27 12:08:20 2020 +0100
Terminate the vector of strings with a NULL pointer
The previous commit relies on the null termination for releasing
the vector content.
libbalsa/filter-file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libbalsa/filter-file.c b/libbalsa/filter-file.c
index 2a5b83da3..753ed362e 100644
--- a/libbalsa/filter-file.c
+++ b/libbalsa/filter-file.c
@@ -185,7 +185,7 @@ libbalsa_mailbox_filters_save_config(LibBalsaMailbox * mbox)
}
names=g_slist_reverse(names);
/* Second we construct the vector of gchar * */
- filters_names = g_new(gchar *, nb_filters + 1);
+ filters_names = g_new0(gchar *, nb_filters + 1);
lst = names;
for(i = 0; i < nb_filters; i++) {
filters_names[i] = (gchar*) lst->data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]