From 39a0826feae4289244d0be471fa7d8c71176bce7 Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Sun, 15 Jun 2014 01:37:17 +0200 Subject: [PATCH] fix invalid free Thanks To DaveDavenport --- notification.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notification.c b/notification.c index 5e0a82f..02f58db 100644 --- a/notification.c +++ b/notification.c @@ -385,11 +385,11 @@ int notification_init(notification * n, int id) n->start = 0; if (n->icon == NULL) { - n->icon = settings.icons[n->urgency]; + n->icon = strdup(settings.icons[n->urgency]); } else if (strlen(n->icon) <= 0) { free(n->icon); - n->icon = settings.icons[n->urgency]; + n->icon = strdup(settings.icons[n->urgency]); } if (n->category == NULL) {