Commit Diff
Diff:
f5fee1b29271485898a5a95c4e0d3a23607f9bd2
a7ca57e70964cdd7287e8e046931d96dc4b125d6
Commit:
a7ca57e70964cdd7287e8e046931d96dc4b125d6
Tree:
ff2633ecb57c5b2b52e9230ed35428daded9d1a1
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Tue Oct 15 12:22:45 2019 UTC
Message:
free some malloc'ed memory.
blob - cfbaec732398f34d361ca563b72d586a96ffb9a4
blob + 5bfb2d714f787135ae127694bd24f9803414f1ef
--- util.c
+++ util.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: util.c,v 1.37 2019/10/15 11:41:10 pjp Exp $
+ * $Id: util.c,v 1.38 2019/10/15 12:22:45 pjp Exp $
*/
#include <sys/types.h>
@@ -1377,6 +1377,8 @@ tsig_pseudoheader(char *tsigkeyname, uint16_t fudge, t
memcpy(&pseudo_packet, keyname, len);
ppoffset += len;
+ free(keyname);
+
/* class */
type = (u_int16_t *) &pseudo_packet[ppoffset];
*type = htons(DNS_CLASS_ANY);
@@ -1395,6 +1397,8 @@ tsig_pseudoheader(char *tsigkeyname, uint16_t fudge, t
/* alg name */
memcpy(&pseudo_packet[ppoffset], keyname, len);
ppoffset += len;
+
+ free(keyname);
/* time 1 and 2 */
now = time(NULL);
repomaster@centroid.eu