server: Fix a possible memory leak.

This commit is contained in:
Mike McCormack 2006-06-08 17:02:04 +09:00 committed by Alexandre Julliard
parent db9b557b54
commit 0a8b344f7b
1 changed files with 1 additions and 0 deletions

View File

@ -656,6 +656,7 @@ static struct key *create_key( struct key *key, const struct unicode_str *name,
if (class && class->len)
{
key->classlen = class->len;
if (key->class) free(key->class);
if (!(key->class = memdup( class->str, key->classlen ))) key->classlen = 0;
}
grab_object( key );