]> git.tuebingen.mpg.de Git - adu.git/blobdiff - format.c
parse_select_options(): Check directly for NULL strings.
[adu.git] / format.c
index 6b7a2f6e2186b8850f2e04abaecff9cb88b3a625..f6b1f48d102d9762696de1345fd61cdce9c83c28 100644 (file)
--- a/format.c
+++ b/format.c
@@ -262,11 +262,17 @@ err:
        return ret;
 }
 
+/**
+ * It's OK to pass a \p NULL pointer to this function.
+ */
 void free_format_info(struct format_info *info)
 {
        int i;
        struct format_item *item;
 
+       if (!info)
+               return;
+
        for (i = 0; (item = info->items[i]); i++) {
                if (!item->atom_ptr)
                        free(item->af.cs.string);