Skip to content

Commit bbaf821

Browse files
committed
Fixed wrong warning on memory leak.
Set the auth_hdr buffer to NULL after moving the buffer into the lump. Reported by Colin Martin on mailing list
1 parent 41c8902 commit bbaf821

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/uac/auth.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ int uac_auth( struct sip_msg *msg)
268268
new_hdr->s = NULL; new_hdr->len = 0;
269269
goto error;
270270
}
271+
/* the Authorization hdr was already pushed into the message as a lump
272+
* along with the buffer, so detach the buffer from new_hdr var */
273+
new_hdr->s = NULL; new_hdr->len = 0;
271274

272275
if ( (new_cseq = apply_cseq_op(msg,1)) < 0) {
273276
LM_WARN("Failure to increment the CSEQ header - continue \n");

0 commit comments

Comments
 (0)