summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2015-05-19 17:24:45 +0530
committerVenky Shankar <vshankar@redhat.com>2015-07-14 06:12:06 -0700
commit2ca64411fd134eb03fc8b40dec91e94027ad82b1 (patch)
tree6f1f0cb0b8b8a2fa7f8bc020e00bd12b40f1d490 /xlators/mgmt/glusterd
parent7766c0df5509e8acb6768c69d3f5642909781135 (diff)
geo-replication: fix memory leak in gsyncd
1. leak in str2argv() function: char *strdup(const char *s); The strdup() function returns a pointer to a new string which is a duplicate of the string s. Memory for the new string is obtained with malloc(3), and can be freed with free(3). so when using strdup, user has to take care of freeing the memory allocated by strdup library function. 2. leak in main() function: str2argv() function calls calloc and allocates memory pointed to argv, after return from str2argv() memory pointed to argv has to be cleaned in main(). This patch is to fix 2 memory leaks mentioned above. Change-Id: I6bf26101e0460a7324ac7bdb69905839688d4987 BUG: 1222898 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/10831 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Milind Changire <mchangir@redhat.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
0 files changed, 0 insertions, 0 deletions