coccinelle: make use of the "type" FREE_AND_NULL() rule
[gitweb.git] / mailinfo.c
index f92cb9f729ca05ae1e80c9c27bc102dbb64a8dc0..44f829edb169ad4f3822b5a8cc1a7b0f6037087b 100644 (file)
@@ -919,8 +919,7 @@ static int handle_boundary(struct mailinfo *mi, struct strbuf *line)
                /* we hit an end boundary */
                /* pop the current boundary off the stack */
                strbuf_release(*(mi->content_top));
-               free(*(mi->content_top));
-               *(mi->content_top) = NULL;
+               FREE_AND_NULL(*(mi->content_top));
 
                /* technically won't happen as is_multipart_boundary()
                   will fail first.  But just in case..