Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit b89dba4

Browse files
authored
Merge pull request #202 from lioyerar/fix_coredump_db
libtac: fix double free in tac_acct_read_timeout
2 parents 4284d90 + a6c2742 commit b89dba4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

libtac/lib/acct_r.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ int tac_acct_read_timeout(int fd, struct areply *re, unsigned long timeout)
139139
msg = (char *)xcalloc(1, tb->msg_len + 1);
140140
memcpy(msg, (unsigned char *)tb + TAC_ACCT_REPLY_FIXED_FIELDS_SIZE, tb->msg_len);
141141
msg[(int)tb->msg_len] = '\0';
142-
re->msg = msg;
143-
free(msg);
142+
re->msg = msg; /* Freed by caller */
144143
}
145144

146145
/* server logged our request successfully */

0 commit comments

Comments
 (0)