mirror of
https://github.com/libssh2/libssh2.git
synced 2026-10-24 03:48:58 +03:00
src: add SSH2_SAFEFREE() macro and use it
Like `SSH2_FREE()` but also assign `NULL` to the freed pointer variable. Also add checksrc rule to verify. Ref: #2208 Closes #2209
This commit is contained in:
@@ -988,6 +988,10 @@ sub scanfile {
|
||||
$prevfreeindent = $1;
|
||||
$prevfreevar = $2;
|
||||
}
|
||||
elsif($l =~ /^( *)SSH2_FREE\(([^)]+), ([^)]+)\);/) {
|
||||
$prevfreeindent = $1;
|
||||
$prevfreevar = $3;
|
||||
}
|
||||
else {
|
||||
$prevfreeindent = "";
|
||||
$prevfreevar = "";
|
||||
|
||||
Reference in New Issue
Block a user