YFS Coverity 11034
Change-Id: I5037b7e6d804e6a61e02258927f06d24cc0b2051
This commit is contained in:
@@ -934,13 +934,17 @@ krb5_config_vget_strings(krb5_context context,
|
||||
s = next_component_string(tmp, " \t", &pos);
|
||||
while(s){
|
||||
char **tmp2 = realloc(strings, (nstr + 1) * sizeof(*strings));
|
||||
if(tmp2 == NULL)
|
||||
if(tmp2 == NULL) {
|
||||
free(tmp);
|
||||
goto cleanup;
|
||||
}
|
||||
strings = tmp2;
|
||||
strings[nstr] = strdup(s);
|
||||
nstr++;
|
||||
if(strings[nstr-1] == NULL)
|
||||
if(strings[nstr-1] == NULL) {
|
||||
free(tmp);
|
||||
goto cleanup;
|
||||
}
|
||||
s = next_component_string(NULL, " \t", &pos);
|
||||
}
|
||||
free(tmp);
|
||||
|
Reference in New Issue
Block a user