[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagat

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp
Date: Wed, 11 Mar 2020 12:49:49 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

11.03.2020 12:33, Markus Armbruster wrote:
Vladimir Sementsov-Ogievskiy <address@hidden> writes:

09.03.2020 12:56, Markus Armbruster wrote:
+// Convert error clearing functions
Suggest: Ensure @local_err is cleared on free

But there is no local_err after conversion

True.  Hmm.  What about this:

      // Convert calls to error_free(), possibly indirect
      // In addition to replacing @local_err by *errp, we have to clear *errp
      // to avoid use-after-free in the automatic error propagation.


+-    error_free(local_err);
++    error_free_errp(errp);
+-    error_report_err(local_err);
++    error_report_errp(errp);
+-    error_reportf_err(local_err, args);
++    error_reportf_errp(errp, args);
+-    warn_report_err(local_err);
++    warn_report_errp(errp);
+-    warn_reportf_err(local_err, args);

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]