From 52deea9465f92282dc32cbf5e5017392371e34de Mon Sep 17 00:00:00 2001 From: Aron Podrigal Date: Wed, 11 Sep 2024 04:03:46 -0500 Subject: [PATCH] Fixes #3464 when setting `connected_ts` set the address which is being used as value? (cherry picked from commit a3dd31ad6e0cb3728a7f0b0a3e6bbfc5e3beb79c) --- modules/rest_client/rest_methods.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rest_client/rest_methods.c b/modules/rest_client/rest_methods.c index 8b3d20872f5..0bdac16d987 100644 --- a/modules/rest_client/rest_methods.c +++ b/modules/rest_client/rest_methods.c @@ -631,8 +631,8 @@ void rcl_release_url(char *url_host, int update_conn_ts) void **connected_ts; connected_ts = map_get(rcl_connections, host_str); - if (connected_ts) - *connected_ts = (void *)(unsigned long)get_ticks(); + if (connected_ts && *connected_ts) + *(unsigned long *)(*connected_ts) = (unsigned long)get_ticks(); } pkg_free(url_host);