btp_backtrace_get_crash_frame tries to duplicate a frame which is not there. Fixes rhbz#903140.
Signed-off-by: Martin Milata <[email protected]> --- lib/frame.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/frame.c b/lib/frame.c index 87e9bb5..83da36d 100644 --- a/lib/frame.c +++ b/lib/frame.c @@ -66,6 +66,9 @@ btp_frame_free(struct btp_frame *frame) struct btp_frame * btp_frame_dup(struct btp_frame *frame, bool siblings) { + if (!frame) + return NULL; + struct btp_frame *result = btp_frame_new(); memcpy(result, frame, sizeof(struct btp_frame)); -- 1.7.11.7
