• David Howells's avatar
    KEYS: Fix variable uninitialisation warnings · eca1bf5b
    David Howells authored
    Fix variable uninitialisation warnings introduced in:
    
    	commit 8bbf4976
    	Author: David Howells <dhowells@redhat.com>
    	Date:   Fri Nov 14 10:39:14 2008 +1100
    
    	KEYS: Alter use of key instantiation link-to-keyring argument
    
    As:
    
      security/keys/keyctl.c: In function 'keyctl_negate_key':
      security/keys/keyctl.c:976: warning: 'dest_keyring' may be used uninitialized in this function
      security/keys/keyctl.c: In function 'keyctl_instantiate_key':
      security/keys/keyctl.c:898: warning: 'dest_keyring' may be used uninitialized in this function
    
    Some versions of gcc notice that get_instantiation_key() doesn't always set
    *_dest_keyring, but fail to observe that if this happens then *_dest_keyring
    will not be read by the caller.
    Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    Signed-off-by: default avatarJames Morris <jmorris@namei.org>
    eca1bf5b
keyctl.c 29.8 KB