Initialize allocated memory in any_resolve()

Otherwise we might attempt to free an uninitialized pointer.
This commit is contained in:
Asanka C. Herath
2010-12-02 01:16:05 -05:00
parent 361ae3b03d
commit 3e8172f9e3

View File

@@ -61,7 +61,7 @@ any_resolve(krb5_context context, const char *name, krb5_keytab id)
char buf[256];
while (strsep_copy(&name, ",", buf, sizeof(buf)) != -1) {
a = malloc(sizeof(*a));
a = calloc(1, sizeof(*a));
if (a == NULL) {
ret = ENOMEM;
goto fail;