linux/samples/livepatch
Nicholas Mc Guire 5f30b2e823 livepatch: check kzalloc return values
kzalloc() return should always be checked - notably in example code
where this may be seen as reference. On failure of allocation in
livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous
allocation is freed (thanks to Petr Mladek <pmladek@suse.com> for
catching this) and NULL returned.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Fixes: 439e7271dc ("livepatch: introduce shadow variable API")
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-12-18 10:23:07 +01:00
..
livepatch-callbacks-busymod.c livepatch: add (un)patch callbacks 2017-10-19 10:08:56 +02:00
livepatch-callbacks-demo.c livepatch: Remove immediate feature 2018-01-11 10:58:03 +01:00
livepatch-callbacks-mod.c livepatch: add (un)patch callbacks 2017-10-19 10:08:56 +02:00
livepatch-sample.c livepatch: Remove immediate feature 2018-01-11 10:58:03 +01:00
livepatch-shadow-fix1.c livepatch: check kzalloc return values 2018-12-18 10:23:07 +01:00
livepatch-shadow-fix2.c livepatch: Allow to call a custom callback when freeing shadow variables 2018-04-17 13:42:48 +02:00
livepatch-shadow-mod.c livepatch: check kzalloc return values 2018-12-18 10:23:07 +01:00
Makefile livepatch: add (un)patch callbacks 2017-10-19 10:08:56 +02:00