summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-peer.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-27 18:22:15 +0530
committerVijay Bellur <vijay@gluster.com>2012-04-02 02:44:47 -0700
commitb0bb1a2c979078efa3ab024e14119df6087c4320 (patch)
tree1ef163912d342ff1f595dfcc4e9791d22dde7a67 /cli/src/cli-cmd-peer.c
parentdc2a52fa0d83ba2e807a175655fc0362b707a22d (diff)
cli: do the proper STACK_DESTORY of created frames
* fixes memory leaks * fixes some random local mem-pool empty messages Change-Id: Ic79f279f2acfe4722fa54d52397d0267b3918928 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 803638 Reviewed-on: http://review.gluster.com/3018 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli/src/cli-cmd-peer.c')
-rw-r--r--cli/src/cli-cmd-peer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-peer.c b/cli/src/cli-cmd-peer.c
index 7f0d28f6d08..60756f31085 100644
--- a/cli/src/cli-cmd-peer.c
+++ b/cli/src/cli-cmd-peer.c
@@ -96,6 +96,9 @@ out:
if ((sent == 0) && (parse_error == 0))
cli_out ("Peer probe failed");
}
+ if (frame)
+ STACK_DESTROY (frame->root);
+
return ret;
}
@@ -161,6 +164,9 @@ out:
cli_out ("Peer detach failed");
}
+ if (frame)
+ STACK_DESTROY (frame->root);
+
return ret;
}
@@ -196,6 +202,10 @@ out:
if ((sent == 0) && (parse_error == 0))
cli_out ("Peer status failed");
}
+
+ if (frame)
+ STACK_DESTROY (frame->root);
+
return ret;
}