From 219b180c3cea9ad674a5512412fbd75592f61aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Wed, 5 Feb 2020 13:49:22 +0100 Subject: [PATCH] rr_decode: Fix potential double free Now that we are always releasing the rr_entry and all its data, we might end up freeing the domain names twice --- src/rr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rr.c b/src/rr.c index 7e45394..a29bfc3 100644 --- a/src/rr.c +++ b/src/rr.c @@ -368,6 +368,7 @@ rr_decode(const uint8_t *ptr, size_t *n, const uint8_t *root, char **ss, uint8_t return (ptr); err: free(*ss); + *ss = NULL; return (NULL); }