]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Add NULL checks
authorSimon Rozman <simon@rozman.si>
Sun, 24 Feb 2019 18:14:00 +0000 (19:14 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 28 Feb 2019 14:55:03 +0000 (15:55 +0100)
commitfbb5d6c56b5586ffd3731fc76e706131b635be58
tree17f761d0d82335db500a1d7692cd4a3c957862bd
parentf75351da2974dac10baca5fa83c18be7f27c73cf
Add NULL checks

Extra NULL checks were added after malloc() calls to display out-of-
memory error and try to exit gracefully.

Function msica_op_create_*() now return NULL in out-of-memory condition
too. Since their output is directly used in msica_op_seq_add_head() and
msica_op_seq_add_tail() functions, later were extended to check for NULL
pointer arguments.

This patch follows Gert's recommendations from [openvpn-devel].

Signed-off-by: Simon Rozman <simon@rozman.si>
Message-ID: <20190117155829.GA92142@greenie.muc.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20190224181400.42524-1-simon@rozman.si
20190117155829.GA92142@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18231.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpnmsica/dllmain.c
src/openvpnmsica/msica_op.c
src/openvpnmsica/msiex.c
src/openvpnmsica/openvpnmsica.c
src/tapctl/tap.c