Fix Svace issue. 91/142791/2
authorWoochan Lee <wc0917.lee@samsung.com>
Mon, 7 Aug 2017 08:31:04 +0000 (17:31 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 7 Aug 2017 11:27:00 +0000 (11:27 +0000)
Change-Id: I5559eabddbb9bb3034ba9eea8fec1aadb2f6d3d8

src/lib/elm_helper.c

index a1aae3f..87ae999 100644 (file)
@@ -18,6 +18,7 @@ elm_validator_regexp_new(const char *pattern, const char *sig)
    Elm_Validator_Regexp *validator;
 
    validator = calloc(1, sizeof(Elm_Validator_Regexp));
+   if (!validator) return NULL;
    validator->signal = eina_stringshare_add(sig ? sig : "default");
    validator->status = regcomp(&validator->regex, pattern, REG_EXTENDED | REG_NOSUB) ? ELM_REG_BADPAT : ELM_REG_NOERROR;