]> git.tuebingen.mpg.de Git - paraslash.git/commit
crypt: Streamline get_asymmetric_key().
authorAndre Noll <maan@systemlinux.org>
Mon, 15 Aug 2011 18:05:11 +0000 (20:05 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 21 Sep 2011 09:04:30 +0000 (11:04 +0200)
commit6f24630aa6d5ea343f0f0626b356d03fa36f890e
tree2b84df043f6676ab3ed8d0c4833a656f87c82d0b
parent7321c2e7aad44b741be702de0a2ef73222be0d08
crypt: Streamline get_asymmetric_key().

The clang analyzer says

crypt.c:202:9: warning: Function call argument is an uninitialized value
        ret2 = para_munmap(map, map_size);
               ^                ~~~~~~~~
And right it is. This is not a bug though as map_size is only undefined
if map is NULL and in this case para_munmap does not look at its second
argument. However, this is rather subtle, so introduce a new label out_unmap
and jump there only if we really must unmap the file.
crypt.c