when destroying a udp rpc context, free any udp_dest data we may have
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Sun, 26 Jun 2011 08:58:54 +0000 (18:58 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Sun, 26 Jun 2011 08:58:54 +0000 (18:58 +1000)
lib/init.c

index b980eabeeb475a877f002a2d96da06c88b3b8b67..5663f250123ef1b6bccf24b0b84feae768083961 100644 (file)
@@ -148,6 +148,11 @@ void rpc_destroy_context(struct rpc_context *rpc)
                rpc->error_string = NULL;
        }
 
+       if (rpc->udp_dest != NULL) {
+               free(rpc->udp_dest);
+               rpc->udp_dest = NULL;
+       }
+
        free(rpc);
 }