From be255a4e71f3d5b4f23f2c7be88ebc3858346a18 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 19:45:13 +0000 Subject: Apply patch 0007-examples-fix-double-free-in-nftc-helper-add.patch patch_name: 0007-examples-fix-double-free-in-nftc-helper-add.patch present_in_specfile: true location_in_specfile: 7 --- diff --git a/examples/nfct-helper-add.c b/examples/nfct-helper-add.c index 6c47626..cb7291e 100644 --- a/examples/nfct-helper-add.c +++ b/examples/nfct-helper-add.c @@ -32,6 +32,7 @@ int main(int argc, char *argv[]) nfct_helper_attr_set_u16(nfct_helper, NFCTH_ATTR_PROTO_L3NUM, AF_INET); nfct_helper_attr_set_u8(nfct_helper, NFCTH_ATTR_PROTO_L4NUM, IPPROTO_TCP); + /* Will be freed by nfct_helper_free. */ p = nfct_helper_policy_alloc(); if (p == NULL) { perror("OOM"); @@ -49,7 +50,6 @@ int main(int argc, char *argv[]) nfct_helper_nlmsg_build_payload(nlh, nfct_helper); nfct_helper_free(nfct_helper); - nfct_helper_policy_free(p); nl = mnl_socket_open(NETLINK_NETFILTER); if (nl == NULL) {