re-apply tools/coccinelle/free_obj.cocci

Missing include for REPLACE() / memset() added manually.
parent c108e603
...@@ -247,7 +247,7 @@ VCP_Rel(struct conn_pool **cpp) ...@@ -247,7 +247,7 @@ VCP_Rel(struct conn_pool **cpp)
AZ(cp->n_conn); AZ(cp->n_conn);
AZ(cp->n_kill); AZ(cp->n_kill);
free(cp->endpoint); free(cp->endpoint);
free(cp); FREE_OBJ(cp);
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
......
...@@ -150,7 +150,7 @@ sma_free(struct storage *s) ...@@ -150,7 +150,7 @@ sma_free(struct storage *s)
sma_sc->stats->g_space += sma->sz; sma_sc->stats->g_space += sma->sz;
Lck_Unlock(&sma_sc->sma_mtx); Lck_Unlock(&sma_sc->sma_mtx);
free(sma->s.ptr); free(sma->s.ptr);
free(sma); FREE_OBJ(sma);
} }
static VCL_BYTES v_matchproto_(stv_var_used_space) static VCL_BYTES v_matchproto_(stv_var_used_space)
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <string.h>
#include "miniobj.h" #include "miniobj.h"
#include "vdef.h" #include "vdef.h"
...@@ -256,7 +257,7 @@ VBH_destroy(struct vbh **bhp) ...@@ -256,7 +257,7 @@ VBH_destroy(struct vbh **bhp)
for (u = 0; u < bh->length; u += ROW_WIDTH) for (u = 0; u < bh->length; u += ROW_WIDTH)
free(ROW(bh, u)); free(ROW(bh, u));
free(bh->array); free(bh->array);
free(bh); FREE_OBJ(bh);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment