Commit b8f78820 authored by Johannes Berg's avatar Johannes Berg Committed by Richard Weinberger

um: Avoid using uninitialized regs

In timer_real_alarm_handler(), regs is only initialized if
the context argument is non-NULL, also initialize in the
other case.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Acked-by: default avatarAnton Ivanov <anton.ivanov@cambridgegreys.co.uk>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 68c15a2b
......@@ -10,6 +10,7 @@
#include <stdarg.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <strings.h>
#include <as-layout.h>
#include <kern_util.h>
......@@ -88,6 +89,8 @@ static void timer_real_alarm_handler(mcontext_t *mc)
if (mc != NULL)
get_regs_from_mc(&regs, mc);
else
memset(&regs, 0, sizeof(regs));
timer_handler(SIGALRM, NULL, &regs);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment