value of attr may be NULL so check before passing
to function.

Signed-off-by: Amit Khatri <amit.kha...@samsung.com>
Signed-off-by: Rahul Jain <rahul.j...@samsung.com>
---
 event.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/event.c b/event.c
index 5fb5afc..5d0bfde 100644
--- a/event.c
+++ b/event.c
@@ -49,8 +49,10 @@ static void print_frame(struct print_event_args *args, 
struct nlattr *attr)
        char macbuf[6*3];
        uint16_t tmp;

-       if (!attr)
+       if (!attr) {
                printf(" [no frame]");
+               return;
+       }

        frame = nla_data(attr);
        len = nla_len(attr);
--
1.9.1

Reply via email to