ovs-appctl: Free memory on exit.
authorBen Pfaff <blp@nicira.com>
Tue, 2 Feb 2010 22:18:01 +0000 (14:18 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 2 Feb 2010 23:21:09 +0000 (15:21 -0800)
This makes it easier to see real memory leaks.

Found via valgrind.

utilities/ovs-appctl.c

index 1302bf2..7a3d91e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -71,6 +71,10 @@ main(int argc, char *argv[])
     }
     fputs(reply, stdout);
 
+    unixctl_client_destroy(client);
+    free(reply);
+    ds_destroy(&request);
+
     return 0;
 }