diff options
author | Markus Armbruster <armbru@redhat.com> | 2022-09-23 11:04:28 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2022-10-04 00:10:11 +0200 |
commit | 76eb88b12baf2bd9a1729ded33bd58b7da5d7ec3 (patch) | |
tree | c43a4a4027d2374c0918dac0dce7bd60be676c1b /target/i386/whpx/whpx-all.c | |
parent | 90dc46d31495ec5825dc35e6984c38149261538f (diff) | |
download | qemu-76eb88b12baf2bd9a1729ded33bd58b7da5d7ec3.zip qemu-76eb88b12baf2bd9a1729ded33bd58b7da5d7ec3.tar.gz qemu-76eb88b12baf2bd9a1729ded33bd58b7da5d7ec3.tar.bz2 |
Drop superfluous conditionals around g_free()
There is no need to guard g_free(P) with if (P): g_free(NULL) is safe.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220923090428.93529-1-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'target/i386/whpx/whpx-all.c')
-rw-r--r-- | target/i386/whpx/whpx-all.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index b22a331..8e4969e 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -1225,14 +1225,12 @@ static void whpx_translate_cpu_breakpoints( } } - if (breakpoints->breakpoints) { - /* - * Free the previous breakpoint list. This can be optimized by keeping - * it as shadow buffer for the next computation instead of freeing - * it immediately. - */ - g_free(breakpoints->breakpoints); - } + /* + * Free the previous breakpoint list. This can be optimized by keeping + * it as shadow buffer for the next computation instead of freeing + * it immediately. + */ + g_free(breakpoints->breakpoints); breakpoints->breakpoints = new_breakpoints; } |