aboutsummaryrefslogtreecommitdiffstats
path: root/src/rtsp_client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/rtsp_client.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rtsp_client.c b/src/rtsp_client.c
index d05efa619..a808ef207 100644
--- a/src/rtsp_client.c
+++ b/src/rtsp_client.c
@@ -681,11 +681,15 @@ rtspcl_setup(struct rtspcl_data *rtspcld, struct key_data **kd,
rval = true;
erexit:
g_free(buf);
- if (!rval) {
+
+ if (!rval || kd == NULL) {
free_kd(rkd);
rkd = NULL;
}
- *kd = rkd;
+
+ if (kd != NULL)
+ *kd = rkd;
+
return rval;
}