Make sure the results of getaddrinfo(3) are properly freed in notify().
Note this is a one-time addrinfo allocation that would be automatically
freed when sm-notify exits anyway, so this is more of a nit than a real
bug fix.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
opt_srcaddr);
exit(1);
}
- memcpy(&local_addr, ai->ai_addr, ai->ai_addrlen);
+
/* We know it's IPv4 at this point */
+ memcpy(&local_addr, ai->ai_addr, ai->ai_addrlen);
+
+ freeaddrinfo(ai);
}
/* Use source port if provided on the command line,