diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-06-18 18:56:35 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-06-18 18:56:35 (GMT) |
commit | 823e0e2f2a764fb2e9025b824e3fc63a8817e5c6 (patch) | |
tree | fbe26e4de0a65d69503af37b1394fc189b0ca8fb | |
parent | c3c4660ca77e771d3a34a7e9029d02588e1ecd92 (diff) |
Fixed mistakes when no instruction to comment is found.
-rw-r--r-- | plugins/lnxsyscalls/hops_armv7.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/lnxsyscalls/hops_armv7.c b/plugins/lnxsyscalls/hops_armv7.c index 58b2702..ebd4b2c 100644 --- a/plugins/lnxsyscalls/hops_armv7.c +++ b/plugins/lnxsyscalls/hops_armv7.c @@ -236,9 +236,10 @@ static void comment_armv7_linux_syscall(tracked_path *exec, size_t sid, syscall_ instr = get_register_write_location(exec, sid, reg); if (instr != NULL) + { add_comment_at(writer, info->name, instr); - - g_object_unref(G_OBJECT(instr)); + g_object_unref(G_OBJECT(instr)); + } g_object_unref(G_OBJECT(reg)); @@ -251,9 +252,10 @@ static void comment_armv7_linux_syscall(tracked_path *exec, size_t sid, syscall_ instr = get_register_write_location(exec, sid, reg); if (instr != NULL) + { add_comment_at(writer, info->argv[i], instr); - - g_object_unref(G_OBJECT(instr)); + g_object_unref(G_OBJECT(instr)); + } g_object_unref(G_OBJECT(reg)); |