FOREACH_WORD(word, len, string, state) {
/* WORD FORMAT: dst_ip/dst_prefixlen,gw_ip */
- _cleanup_free_ char* entry;
+ _cleanup_free_ char* entry = NULL;
char *tok, *tok_end;
unsigned n;
int r;
return -ENOMEM;
entry = strndup(word, len);
+ if(!entry)
+ return -ENOMEM;
tok = entry;