fix bad frees

This commit is contained in:
Sascha Kruse 2012-10-08 08:11:32 +02:00
parent 286e0c5104
commit d9d2ccb3d4

View File

@ -188,12 +188,12 @@ void warn(const char *text, int urg)
if (n == NULL) if (n == NULL)
die("Unable to allocate memory", EXIT_FAILURE); die("Unable to allocate memory", EXIT_FAILURE);
n->appname = "dunst"; n->appname = strdup("dunst");
n->summary = strdup(text); n->summary = strdup(text);
if (n->summary == NULL) if (n->summary == NULL)
die("Unable to allocate memory", EXIT_FAILURE); die("Unable to allocate memory", EXIT_FAILURE);
n->body = ""; n->body = strdup("");
n->icon = ""; n->icon = strdup("");
n->timeout = 0; n->timeout = 0;
n->urgency = urg; n->urgency = urg;
n->dbus_client = NULL; n->dbus_client = NULL;