summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/server/src/server-resolve.c')
-rw-r--r--xlators/protocol/server/src/server-resolve.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xlators/protocol/server/src/server-resolve.c b/xlators/protocol/server/src/server-resolve.c
index df16aef2202..1da41b2fd59 100644
--- a/xlators/protocol/server/src/server-resolve.c
+++ b/xlators/protocol/server/src/server-resolve.c
@@ -61,7 +61,6 @@ prepare_components (call_frame_t *frame)
int i = 0;
char *trav = NULL;
-
state = CALL_STATE (frame);
resolve = state->resolve_now;
@@ -71,8 +70,8 @@ prepare_components (call_frame_t *frame)
count = component_count (resolve->path);
components = GF_CALLOC (sizeof (*components), count,
gf_server_mt_resolv_comp_t);
- if (!components)
- goto out;
+ GF_VALIDATE_OR_GOTO ("server", components, out);
+
resolve->components = components;
components[0].basename = "";