From: Florian Forster Date: Sat, 11 Sep 2010 12:48:50 +0000 (+0200) Subject: src/utils_search.c: Safeguard against NULL-pointer errors. X-Git-Tag: v4.0.0~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7458dd65b5d353b296e0a913091ad06eddc43300;p=collection4.git src/utils_search.c: Safeguard against NULL-pointer errors. --- diff --git a/src/utils_search.c b/src/utils_search.c index 1a1be7d..84c9035 100644 --- a/src/utils_search.c +++ b/src/utils_search.c @@ -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);