From: Arran Cudbard-Bell Date: Thu, 19 Jun 2014 15:44:51 +0000 (+0100) Subject: Should always set the pointer to NULL to avoid corner case on malloc failure X-Git-Tag: release_3_0_4_rc2~258 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=1167c4a5e1456074872db269a415db19a01d301b;p=freeradius.git Should always set the pointer to NULL to avoid corner case on malloc failure --- diff --git a/src/main/radsniff.c b/src/main/radsniff.c index db0d244..39f28eb 100644 --- a/src/main/radsniff.c +++ b/src/main/radsniff.c @@ -957,7 +957,7 @@ static inline int rs_request_to_pcap(rs_event_t *event, rs_request_t *request, s /* Free the old capture */ if (request->capture_p->header) { talloc_free(request->capture_p->header); - talloc_free(request->capture_p->data); + TALLOC_FREE(request->capture_p->data); } if (!(request->capture_p->header = talloc(request, struct pcap_pkthdr))) return -1;