[master] 7dda86f Add a NULL pointer check
    Poul-Henning Kamp 
    phk at varnish-cache.org
       
    Sat Jun 29 13:12:10 CEST 2013
    
    
  
commit 7dda86f17380e3ae88adc4b5c2f6f3d56c8ed018
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat Jun 29 11:08:55 2013 +0000
    Add a NULL pointer check
diff --git a/lib/libvarnishapi/vsl_query.c b/lib/libvarnishapi/vsl_query.c
index 20efff4..9685486 100644
--- a/lib/libvarnishapi/vsl_query.c
+++ b/lib/libvarnishapi/vsl_query.c
@@ -66,7 +66,8 @@ vslq_newquery(struct VSL_data *vsl, enum VSL_grouping_e grouping,
 	}
 
 	ALLOC_OBJ(query, VSLQ_QUERY_MAGIC);
-	query->regex = regex;
+	if (query != NULL)
+		query->regex = regex;
 	return (query);
 }
 
    
    
More information about the varnish-commit
mailing list