Initialize allocated memory in any_resolve()
Otherwise we might attempt to free an uninitialized pointer.
This commit is contained in:
@@ -61,7 +61,7 @@ any_resolve(krb5_context context, const char *name, krb5_keytab id)
|
|||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
while (strsep_copy(&name, ",", buf, sizeof(buf)) != -1) {
|
while (strsep_copy(&name, ",", buf, sizeof(buf)) != -1) {
|
||||||
a = malloc(sizeof(*a));
|
a = calloc(1, sizeof(*a));
|
||||||
if (a == NULL) {
|
if (a == NULL) {
|
||||||
ret = ENOMEM;
|
ret = ENOMEM;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Reference in New Issue
Block a user