summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-11-15 13:50:26 +0100
committerFrediano Ziglio <fziglio@redhat.com>2019-11-15 14:10:23 +0000
commit43c05401c48d98572c53c92b81237f607f85386d (patch)
tree7988198e0627559dc0f1a619b9c73517a815dc0b /src
parentebffe4d6a60c74dbf2c0c3227401ca1a62bd4a67 (diff)
vscclient: Avoid memory leaks
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/vscclient.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vscclient.c b/src/vscclient.c
index 8ba9df1..573db8d 100644
--- a/src/vscclient.c
+++ b/src/vscclient.c
@@ -866,6 +866,10 @@ main(
if (emul_args) {
command_line_options = vcard_emul_options(emul_args);
}
+ if (cert_count > 0) {
+ g_free(emul_args);
+ emul_args = NULL;
+ }
qemu_host = g_strdup(argv[argc - 2]);
qemu_port = g_strdup(argv[argc - 1]);