From: Arran Cudbard-Bell Date: Mon, 31 Oct 2022 23:20:12 +0000 (-0600) Subject: Minor fixes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=523693f8a9c3cf995d99e3ba962b48af26c6697d;p=thirdparty%2Ffreeradius-server.git Minor fixes --- diff --git a/src/listen/ldap_sync/proto_ldap_sync_ldap.c b/src/listen/ldap_sync/proto_ldap_sync_ldap.c index c4693c49b82..d43ad80f5d5 100644 --- a/src/listen/ldap_sync/proto_ldap_sync_ldap.c +++ b/src/listen/ldap_sync/proto_ldap_sync_ldap.c @@ -332,7 +332,7 @@ int ldap_sync_entry_send(sync_state_t *sync, uint8_t const uuid[SYNC_UUID_LENGTH FR_DBUFF_TALLOC_THREAD_LOCAL(&dbuff, 1024, 4096); - local = talloc_new(NULL); + MEM(local = talloc_new(NULL)); fr_pair_list_init(&pairs); if (fr_pair_list_copy(local, &pairs, &sync->config->sync_pairs) < 0) { error: diff --git a/src/listen/ldap_sync/rfc4533.c b/src/listen/ldap_sync/rfc4533.c index ae2a3cdae5d..7d5b4641551 100644 --- a/src/listen/ldap_sync/rfc4533.c +++ b/src/listen/ldap_sync/rfc4533.c @@ -148,7 +148,11 @@ int rfc4533_sync_init(fr_ldap_connection_t *conn, size_t sync_no, proto_ldap_syn /* * Register event to store cookies at a regular interval */ - fr_event_timer_in(sync, conn->conn->el, &sync->cookie_ev, inst->cookie_interval, ldap_sync_cookie_event, sync); + if (fr_event_timer_in(sync, conn->conn->el, &sync->cookie_ev, + inst->cookie_interval, ldap_sync_cookie_event, sync) < 0) { + PERROR("Inserting LDAP cookie timer failed"); + goto error; + } return 0; }