]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Minor fixes
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 31 Oct 2022 23:20:12 +0000 (17:20 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 31 Oct 2022 23:20:12 +0000 (17:20 -0600)
src/listen/ldap_sync/proto_ldap_sync_ldap.c
src/listen/ldap_sync/rfc4533.c

index c4693c49b8234e568477943810a91437ef40df4c..d43ad80f5d5eb7b43cbb53f2b1513c85c6a2e696 100644 (file)
@@ -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:
index ae2a3cdae5d0bc3fa8c6f609e2da2aa110fcfc36..7d5b4641551d3cd54852d3449192584f87161bdd 100644 (file)
@@ -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;
 }