Ján Tomko
92b252456e
check for NULL before calling g_regex_unref
...
g_regex_unref reports an error if called with a NULL argument.
We have two cases in the code where we (possibly) call it on a NULL
argument. The interesting one is in virDomainQemuMonitorEventCleanup.
Based on VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX, we unref
data->regex, which has two problems:
* On the client side, flags is -1 so the comparison is true even if no
regex was used, reproducible by:
$ virsh qemu-monitor-event --timeout 1
which results in an ugly error:
(process:1289846): GLib-CRITICAL **: 14:58:42.631: g_regex_unref: assertion 'regex != NULL' failed
* On the server side, we only create the regex if both the flag and the
string are present, so it's possible to trigger this message by:
$ virsh qemu-monitor-event --regex --timeout 1
Use a non-NULL comparison instead of the flag to decide whether we need
to unref the regex. And add a non-NULL check to the unref in the
VirtualBox test too.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: 71efb59a4de7c51b1bc889a316f1796ebf55738f
https://bugzilla.redhat.com/show_bug.cgi?id=1876907
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-09-08 16:07:47 +02:00
..
2020-08-25 08:42:16 +04:00
2020-08-25 08:42:16 +04:00
2019-12-03 13:57:44 +00:00
2020-07-27 15:44:38 +02:00
2020-09-01 21:58:46 +02:00
2020-07-08 08:40:30 +02:00
2020-07-08 08:40:30 +02:00
2020-08-24 16:43:22 +02:00
2019-12-03 13:57:44 +00:00
2020-07-23 16:11:39 +01:00
2019-12-13 17:52:10 +00:00
2020-09-01 14:29:17 -06:00
2020-02-06 15:00:57 +01:00
2020-04-23 10:59:33 +02:00
2020-06-15 17:10:15 +01:00
2020-06-15 17:10:15 +01:00
2020-06-15 17:10:15 +01:00
2020-06-19 10:39:55 +02:00
2020-06-19 10:39:55 +02:00
2019-08-09 12:17:19 +02:00
2019-12-03 13:57:44 +00:00
2020-07-21 09:52:59 +02:00
2020-08-24 16:43:22 +02:00
2019-11-13 08:16:04 +01:00
2019-07-26 16:48:58 -05:00
2019-12-03 13:57:44 +00:00
2019-07-08 16:10:22 -05:00
2019-12-03 13:57:44 +00:00
2019-03-12 15:29:44 +01:00
2020-03-05 11:31:38 +01:00
2020-08-03 10:57:47 +02:00
2020-08-03 10:57:47 +02:00
2020-03-16 16:00:27 +00:00
2020-07-17 07:41:20 +02:00
2019-09-24 13:19:08 -04:00
2020-08-24 18:41:28 +02:00
2020-09-01 09:30:27 +02:00
2019-07-26 09:59:27 +01:00
2019-12-20 14:31:08 +01:00
2020-07-23 16:18:09 +01:00
2020-07-23 16:18:09 +01:00
2019-03-06 11:12:48 -05:00
2020-06-10 14:00:38 +02:00
2020-01-16 15:11:55 +00:00
2019-11-15 12:58:43 +01:00
2020-06-26 15:36:40 +01:00
2019-07-19 10:52:06 +02:00
2020-05-25 16:09:58 +02:00
2020-03-20 09:47:16 +01:00
2019-07-12 16:55:39 +01:00
2019-07-16 13:42:39 +02:00
2020-02-25 15:43:56 +00:00
2019-12-17 10:04:43 +01:00
2020-07-23 16:11:39 +01:00
2020-09-01 14:29:46 -06:00
2020-08-21 08:08:28 -06:00
2020-07-23 16:11:39 +01:00
2020-03-09 15:46:42 +01:00
2020-01-09 18:05:17 +00:00
2020-08-03 07:23:46 +02:00
2020-02-20 23:13:15 -05:00
2020-08-25 08:42:16 +04:00
2020-08-25 08:42:16 +04:00
2020-08-25 19:03:11 +02:00
2020-08-03 07:23:45 +02:00
2020-07-08 16:34:09 -04:00
2020-08-25 19:44:43 +02:00
2020-09-07 10:47:54 +02:00
2019-12-09 10:17:27 +00:00
2019-10-15 16:14:19 +02:00
2020-09-02 10:28:10 +02:00
2019-11-12 16:15:59 +01:00
2020-02-24 23:15:49 +01:00
2020-07-23 16:11:39 +01:00
2019-11-12 16:15:59 +01:00
2020-02-25 12:05:01 +01:00
2020-09-02 10:28:10 +02:00
2019-12-09 10:17:27 +00:00
2020-01-03 15:42:12 +00:00
2020-09-04 10:20:49 +02:00
2019-03-08 14:59:20 +01:00
2020-04-23 12:38:01 +02:00
2020-07-08 16:34:09 -04:00
2020-06-15 17:10:15 +01:00
2019-11-12 16:15:59 +01:00
2020-08-25 19:03:11 +02:00
2019-11-12 16:15:59 +01:00
2019-10-15 11:25:25 +02:00
2020-07-10 09:40:58 +02:00
2020-07-10 09:40:58 +02:00
2020-07-08 16:34:09 -04:00
2020-07-08 16:34:09 -04:00
2019-11-12 16:15:59 +01:00
2020-02-24 23:15:50 +01:00
2019-12-09 14:46:13 +00:00
2020-06-26 15:36:40 +01:00
2020-08-03 07:23:46 +02:00
2020-08-04 20:19:48 +04:00
2020-08-17 08:42:47 +02:00
2020-08-03 07:23:46 +02:00
2020-05-25 16:10:04 +02:00
2020-07-08 16:34:09 -04:00
2019-10-15 11:25:25 +02:00
2020-07-07 12:58:19 +02:00
2020-08-03 07:23:46 +02:00
2020-01-03 15:42:12 +00:00
2020-07-20 19:08:07 -04:00
2020-09-02 23:45:39 -04:00
2020-08-03 07:23:46 +02:00
2020-08-24 16:42:57 +02:00
2020-08-24 13:02:35 +02:00
2020-08-03 07:23:46 +02:00
2020-05-20 08:53:29 +02:00
2020-08-03 07:23:46 +02:00
2020-07-31 10:27:50 +02:00
2019-07-03 08:36:04 +02:00
2020-01-03 15:42:12 +00:00
2020-01-17 10:02:01 +00:00
2020-09-01 09:30:27 +02:00
2020-09-07 10:47:54 +02:00
2020-06-15 10:27:37 +02:00
2019-10-14 10:54:42 +01:00
2019-11-12 16:15:59 +01:00
2020-09-02 10:28:10 +02:00
2020-08-03 09:27:00 +02:00
2020-08-03 09:27:00 +02:00
2019-10-15 11:25:25 +02:00
2020-08-03 09:27:00 +02:00
2020-08-25 19:03:12 +02:00
2020-02-04 14:00:45 +00:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2020-07-23 16:18:09 +01:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2020-06-10 14:00:38 +02:00
2020-08-17 08:42:47 +02:00
2020-08-03 09:27:05 +02:00
2020-08-03 09:27:00 +02:00
2019-10-15 16:14:19 +02:00
2019-12-09 10:15:16 +00:00
2019-12-09 10:15:16 +00:00
2020-08-03 07:23:46 +02:00
2020-05-20 09:41:58 +02:00
2020-08-24 13:02:35 +02:00
2020-08-24 13:02:35 +02:00
2020-02-25 12:05:00 +01:00
2019-12-09 10:15:16 +00:00
2020-08-03 07:23:45 +02:00
2020-09-08 16:07:47 +02:00
2019-10-21 12:51:59 +02:00
2020-08-25 19:03:12 +02:00
2020-03-20 09:47:16 +01:00
2020-07-08 16:35:54 -04:00
2020-01-16 15:11:55 +00:00
2020-01-27 14:55:03 +01:00
2020-08-25 19:03:11 +02:00
2020-07-08 16:34:09 -04:00
2020-08-03 15:37:36 +02:00
2019-08-23 11:26:26 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2019-10-11 12:20:08 -04:00
2019-11-19 15:22:43 +01:00
2019-10-15 11:25:25 +02:00
2019-10-15 11:25:25 +02:00
2020-06-23 17:33:30 +01:00
2020-09-02 10:28:10 +02:00
2020-09-02 10:28:10 +02:00
2019-11-12 16:15:59 +01:00
2019-06-19 17:12:34 +02:00
2020-07-08 16:36:19 -04:00
2019-06-19 17:12:34 +02:00
2020-01-24 13:45:38 +01:00
2020-07-08 16:34:09 -04:00
2020-05-06 16:24:31 +02:00
2020-05-06 16:24:31 +02:00
2020-08-03 09:27:00 +02:00
2020-08-25 19:03:12 +02:00
2020-03-20 09:47:16 +01:00
2020-02-24 23:15:49 +01:00
2020-07-08 16:34:09 -04:00
2020-02-25 10:02:15 +00:00
2019-08-27 15:49:48 +02:00
2019-11-19 15:22:43 +01:00
2020-09-04 10:20:49 +02:00
2020-09-02 10:28:10 +02:00
2020-09-02 10:28:10 +02:00
2020-07-23 14:58:16 +01:00
2020-03-19 14:39:38 +01:00
2019-07-09 15:01:54 +02:00
2020-07-08 16:34:09 -04:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-19 15:22:43 +01:00
2020-01-29 14:51:40 +00:00
2019-10-15 11:25:25 +02:00
2020-03-19 14:39:38 +01:00
2020-09-02 10:28:10 +02:00
2020-09-02 10:28:10 +02:00
2020-09-02 10:28:10 +02:00
2020-09-02 10:28:10 +02:00
2020-09-02 10:28:10 +02:00
2020-02-25 15:43:56 +00:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2020-01-03 15:42:13 +00:00
2020-01-03 15:42:12 +00:00
2019-11-19 15:22:43 +01:00
2020-09-02 10:28:10 +02:00
2020-09-02 10:28:10 +02:00
2019-10-15 11:25:25 +02:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2020-08-25 19:03:11 +02:00
2020-08-22 16:40:44 +04:00
2020-02-24 23:15:50 +01:00
2020-03-06 17:02:10 +00:00
2020-03-06 17:02:10 +00:00
2019-08-02 09:44:41 -05:00
2019-12-03 13:57:44 +00:00
2020-08-03 09:26:36 +02:00
2020-08-03 09:26:36 +02:00
2019-08-02 09:44:41 -05:00
2020-09-01 23:14:16 +02:00
2019-04-04 09:35:40 -05:00
2020-02-11 16:30:18 +01:00
2020-09-02 10:28:10 +02:00
2019-10-16 12:06:43 +02:00
2020-08-25 19:03:13 +02:00
2020-04-07 15:26:19 +02:00
2020-08-03 09:27:06 +02:00
2020-08-03 09:27:06 +02:00
2020-01-29 14:51:40 +00:00
2019-10-15 16:14:19 +02:00
2020-08-25 19:03:13 +02:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2019-11-12 16:15:59 +01:00
2020-03-19 11:25:33 +01:00
2020-09-02 10:28:10 +02:00
2020-09-01 14:29:46 -06:00
2020-08-21 08:08:28 -06:00
2020-07-13 18:47:44 +02:00