[Git][NTPsec/ntpsec][master] Fix double free detected by scan-build.
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Oct 7 05:00:50 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
6eb07813 by Eric S. Raymond at 2016-10-07T01:00:10-04:00
Fix double free detected by scan-build.
The message was:
../../ntpd/ntp_signd.c:198:5: warning: Attempt to free released memory
free(reply);
^~~~~~~~~~~
and the memory had been freed in recv_packet().
- - - - -
1 changed file:
- ntpd/ntp_signd.c
Changes:
=====================================
ntpd/ntp_signd.c
=====================================
--- a/ntpd/ntp_signd.c
+++ b/ntpd/ntp_signd.c
@@ -194,9 +194,6 @@ send_via_ntp_signd(
}
if (recv_packet(fd, &reply, &reply_len) != 0) {
- if (reply) {
- free(reply);
- }
close(fd);
return;
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/6eb0781396e359db26985d02f3d56c5165c94212
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161007/63f1ddf7/attachment.html>
More information about the vc
mailing list