diff --git a/src/cluster.c b/src/cluster.c index a4e9080b38b..e38517eb00f 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -470,6 +470,7 @@ int clusterLoadConfig(char *filename) { if (field_argv == NULL || field_argc != 2) { /* Invalid aux field format */ if (field_argv != NULL) sdsfreesplitres(field_argv, field_argc); + sdsfreesplitres(aux_argv, aux_argc); sdsfreesplitres(argv,argc); goto fmterr; } @@ -479,6 +480,7 @@ int clusterLoadConfig(char *filename) { if (!isValidAuxString(field_argv[j],sdslen(field_argv[j]))){ /* Invalid aux field format */ sdsfreesplitres(field_argv, field_argc); + sdsfreesplitres(aux_argv, aux_argc); sdsfreesplitres(argv,argc); goto fmterr; } @@ -498,6 +500,7 @@ int clusterLoadConfig(char *filename) { if (auxFieldHandlers[j].setter(n, field_argv[1], sdslen(field_argv[1])) != C_OK) { /* Invalid aux field format */ sdsfreesplitres(field_argv, field_argc); + sdsfreesplitres(aux_argv, aux_argc); sdsfreesplitres(argv,argc); goto fmterr; } @@ -506,6 +509,7 @@ int clusterLoadConfig(char *filename) { if (field_found == 0) { /* Invalid aux field format */ sdsfreesplitres(field_argv, field_argc); + sdsfreesplitres(aux_argv, aux_argc); sdsfreesplitres(argv,argc); goto fmterr; }