The format callback may not always succeed, so we need to check for

NULL. From Patrick Palka.
pull/173/head
nicm 2015-10-27 09:18:06 +00:00
parent 3fc001d0a2
commit 17c2c4219d
1 changed files with 2 additions and 0 deletions

View File

@ -643,6 +643,8 @@ format_find(struct format_tree *ft, const char *key, int modifiers)
return (NULL);
found:
if (found == NULL)
return (NULL);
copy = xstrdup(found);
if (modifiers & FORMAT_BASENAME) {
saved = copy;