libmapper: fix memory leak
Fix a minor leak that occurs if a user passes zero dbus paths to wait
for.
Change-Id: I05eb8b3dbd808978ad9d566a74aee5272aa4c1e3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/libmapper/mapper.c b/libmapper/mapper.c
index 8acc741..3c43eb9 100644
--- a/libmapper/mapper.c
+++ b/libmapper/mapper.c
@@ -334,7 +334,10 @@
wait->userdata = userdata;
wait->count = sarraylen(objs);
if (!wait->count)
- return 0;
+ {
+ r = 0;
+ goto free_wait;
+ }
wait->objs = sarraydup(objs);
if (!wait->objs)