Code

src/utils_search.c: Safeguard against NULL-pointer errors.
authorFlorian Forster <octo@verplant.org>
Sat, 11 Sep 2010 12:48:50 +0000 (14:48 +0200)
committerFlorian Forster <octo@verplant.org>
Sat, 11 Sep 2010 12:48:50 +0000 (14:48 +0200)
src/utils_search.c

index 1a1be7d798f28ccab564d0d6c1ec30921e20c3a1..84c9035609fa26452c219c7993b1ddfbe1c7456f 100644 (file)
@@ -198,6 +198,9 @@ search_info_t *search_parse (const char *search) /* {{{ */
   char *token;
   search_info_t *si;
 
+  if (search == NULL)
+    return (NULL);
+
   si = malloc (sizeof (*si));
   if (si == NULL)
     return (NULL);