(unparse_name): error check malloc properly
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6400 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -254,7 +254,7 @@ unparse_name(krb5_context context,
|
||||
len++;
|
||||
}
|
||||
*name = malloc(len);
|
||||
if(*name == NULL)
|
||||
if(len != 0 && *name == NULL)
|
||||
return ENOMEM;
|
||||
ret = unparse_name_fixed(context, principal, *name, len, short_flag);
|
||||
if(ret)
|
||||
|
Reference in New Issue
Block a user