Re: [PATCH v2 2/2] perf tools: Improve exception handling in two functions of perf events parser

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

 



> Fix potential memory leak. Function new_term may return error, so
> it is need to free memory when the return value is negative.

How do you think about a wording variant like the following?

   Add jump targets so that a configuration object and a duplicated string
   are released after a call of the function “strdup” or “new_term” failed.

Regards,
Markus




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux