]> Pileus Git - ~andy/fetchmail/commitdiff
Protect against possible NULL pointer
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 26 Aug 2011 08:07:03 +0000 (10:07 +0200)
committerMatthias Andree <matthias.andree@gmx.de>
Fri, 26 Aug 2011 09:22:23 +0000 (11:22 +0200)
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
uid_db.c

index eed249afa708cde9617a50088a809332d829cdb4..5e04e4df0616bffadcc095458d8d63187e2ef7d1 100644 (file)
--- a/uid_db.c
+++ b/uid_db.c
@@ -460,6 +460,8 @@ struct uid_db_record *last_uid_in_db(struct uid_db *db, char const *id)
 /**  destruction */
 static void free_uid_list(struct uid_db_record *rec)
 {
+    if (!rec) return NULL;
+
     /*
       Free the list of uid_db_records starting with
       the record pointed to by rec.