summaryrefslogtreecommitdiff
path: root/clients/zctl
diff options
context:
space:
mode:
authorGravatar Lucien Van Elsen <lwvanels@mit.edu>1992-08-20 16:36:34 +0000
committerGravatar Lucien Van Elsen <lwvanels@mit.edu>1992-08-20 16:36:34 +0000
commitf9bcbbf680929c98925f1297ae7550de9822a8fb (patch)
tree560d69d9e12cc69a5b789ce526f417e2a9d2dd70 /clients/zctl
parent919a0693c42efbe15d48f6824f8f464672991a8f (diff)
fix memory leak.
Diffstat (limited to 'clients/zctl')
-rw-r--r--clients/zctl/zctl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clients/zctl/zctl.c b/clients/zctl/zctl.c
index 4748e62..d031b14 100644
--- a/clients/zctl/zctl.c
+++ b/clients/zctl/zctl.c
@@ -788,6 +788,16 @@ load_subs(argc,argv)
}
}
cleanup:
+ for (i=0;i<ind;i++) {
+ free(subs[i].zsub_class);
+ free(subs[i].zsub_classinst);
+ free(subs[i].zsub_recipient);
+ }
+ for (i=0;i<unind;i++) {
+ free(unsubs[i].zsub_class);
+ free(unsubs[i].zsub_classinst);
+ free(unsubs[i].zsub_recipient);
+ }
if (fp)
(void) fclose(fp); /* ignore errs--file is read-only */
return;