]> git.tuebingen.mpg.de Git - paraslash.git/commit
crypt.c: Plug memory leak in get_public_key().
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 16 Nov 2017 01:18:50 +0000 (02:18 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 28 Dec 2017 23:27:07 +0000 (00:27 +0100)
commit129ce40eff6bc09734a82280dec61827b5342759
tree2fdf70c590702c51858ebf94ee7e556f96ed3267
parent349d14071d64971a86d2af092cb09ccbc4989afb
crypt.c: Plug memory leak in get_public_key().

If server.users refers to an existing file which is not a ssh public
key, we leak 4 bytes of memory:

==27302== 4 bytes in 1 blocks are definitely lost in loss record 1 of 8
==27302==    at 0x402C201: malloc (vg_replace_malloc.c:299)
==27302==    by 0x8052FF3: para_malloc (string.c:63)
==27302==    by 0x8066532: get_public_key (crypt.c:151)
==27302==    by 0x80569D1: user_list_init (user_list.c:90)
==27302==    by 0x804D74D: parse_config_or_die (server.c:279)
==27302==    by 0x804C719: server_init (server.c:554)
==27302==    by 0x804C719: main (server.c:655)

Furtunately, this issue is trivial to fix.
crypt.c