]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Resequence to avoid potential double free. Fixes #4863
authorNick Porter <nick@portercomputing.co.uk>
Fri, 27 Jan 2023 16:10:20 +0000 (16:10 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 27 Jan 2023 16:10:20 +0000 (16:10 +0000)
src/listen/ldap_sync/proto_ldap_sync_ldap.c

index 840d79f183aefbee98df8f74afbe66ac83d85b66..e54a743ecf767d038406761ff8b995f2278d2621 100644 (file)
@@ -493,10 +493,10 @@ int ldap_sync_entry_send(sync_state_t *sync, uint8_t const uuid[SYNC_UUID_LENGTH
                }
        }
 
-       ldap_msgfree(msg);
-
        if (fr_dlist_insert_tail(&sync->pending, sync_packet_ctx) < 0) goto error;
 
+       ldap_msgfree(msg);
+
        /*
         *      Send the packet and if it fails to send add a retry event
         */