when destroying a udp rpc context, free any udp_dest data we may have
[deb_libnfs.git] / 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);
 }