exec plugin: Set notify->meta to NULL before copying the list.
authorFlorian Forster <sifnfors@informatik.stud.uni-erlangen.de>
Fri, 13 Jun 2008 12:56:10 +0000 (14:56 +0200)
committerFlorian Forster <sifnfors@informatik.stud.uni-erlangen.de>
Fri, 13 Jun 2008 12:56:10 +0000 (14:56 +0200)
Otherwise we will run into a nasty endless loop.

src/exec.c

index 5f9d6ad..6b6836e 100644 (file)
@@ -788,6 +788,10 @@ static int exec_notification (const notification_t *n)
 
     pln->pl = pl;
     memcpy (&pln->n, n, sizeof (notification_t));
+
+    /* Set the `meta' member to NULL, otherwise `plugin_notification_meta_copy'
+     * will run into an endless loop. */
+    pln->n.meta = NULL;
     plugin_notification_meta_copy (&pln->n, n);
 
     pthread_attr_init (&attr);