mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
Always check return value of ssh_list_new()
Another item identified during code review was cases where the return value of ssh_list_new() was not properly checked and handled. This updates all cases that were missing this to handle failure to allocate a new list. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
daeee74edd
commit
0987e6065c
@@ -138,6 +138,9 @@ static void torture_callbacks_execute_list(void **state){
|
||||
};
|
||||
|
||||
(void)state;
|
||||
|
||||
assert_non_null(list);
|
||||
|
||||
ssh_callbacks_init(&c1);
|
||||
ssh_callbacks_init(&c2);
|
||||
ssh_callbacks_init(&c3);
|
||||
@@ -213,6 +216,8 @@ static void torture_callbacks_iterate(void **state){
|
||||
|
||||
(void)state; /* unused */
|
||||
|
||||
assert_non_null(list);
|
||||
|
||||
ssh_callbacks_init(&c1);
|
||||
ssh_callbacks_init(&c2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user