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

Commit

Permalink
Merge pull request #202 from lioyerar/fix_coredump_db
Browse files Browse the repository at this point in the history
libtac: fix double free in tac_acct_read_timeout
  • Loading branch information
kravietz authored Oct 12, 2023
2 parents 4284d90 + a6c2742 commit b89dba4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libtac/lib/acct_r.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ int tac_acct_read_timeout(int fd, struct areply *re, unsigned long timeout)
msg = (char *)xcalloc(1, tb->msg_len + 1);
memcpy(msg, (unsigned char *)tb + TAC_ACCT_REPLY_FIXED_FIELDS_SIZE, tb->msg_len);
msg[(int)tb->msg_len] = '\0';
re->msg = msg;
free(msg);
re->msg = msg; /* Freed by caller */
}

/* server logged our request successfully */
Expand Down

0 comments on commit b89dba4

Please sign in to comment.