summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2012-06-26 11:13:45 +0100
committerPádraig Brady <P@draigBrady.com>2012-06-26 11:27:32 +0100
commit5958bb44c4d7cf3b69bb62955b3ece9d0715eb60 (patch)
tree17980b19ef71cace06fa0167f6d7e06b2f3eef46 /lib
parent4f2e9d503821c3eadc7344a7e85400779822bf0d (diff)
downloadcoreutils-5958bb44c4d7cf3b69bb62955b3ece9d0715eb60.tar.xz
maint: avoid a static analysis warning in csplit
The Canalyze static code analyzer correctly surmised that there is a use-after-free bug in free_buffer() at the line "struct line *n = l->next", if that function is called multiple times. This is not a runtime issue since a list of lines will not be present in the !lines_found case. * src/csplit.c (free_buffer): Set list head to NULL so that this function can be called multiple times. (load_buffer): Remove a redundant call to free_buffer(). Reported-by: Xu Zhongxing
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions