summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2015-10-29 20:03:47 +0100
committerAlfred E. Heggestad <aeh@db.org>2015-10-29 20:03:47 +0100
commitf828b6600d2c21c5b4948e945e0c68523e136039 (patch)
tree42828c071509daea962c403007e0dfd6b9e50a80
parent664a6cd61f873db3a9e8c3a7faaaf4116fef6328 (diff)
ua: unregister previous event-handler first
-rw-r--r--src/ua.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ua.c b/src/ua.c
index 45102e4..7aeabd5 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -1798,6 +1798,8 @@ int uag_event_register(ua_event_h *h, void *arg)
if (!h)
return EINVAL;
+ uag_event_unregister(h);
+
eh = mem_zalloc(sizeof(*eh), eh_destructor);
if (!eh)
return ENOMEM;