1 // Find and fix trivial use-after-free of Error objects
3 // Copyright (c) 2020 Virtuozzo International GmbH.
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License as
7 // published by the Free Software Foundation; either version 2 of the
8 // License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see
17 // <http://www.gnu.org/licenses/>.
20 // spatch --sp-file scripts/coccinelle/error-use-after-free.cocci \
21 // --macro-file scripts/cocci-macro-file.h --in-place \
22 // --no-show-diff ( FILES... | --use-gitgrep . )
36 error_report_err(err);
39 error_reportf_err(err, ...);
45 warn_reportf_err(err, ...);
48 ... when != err = NULL