ACK: [PATCH] lib: fwts_framework: free just items in list and not list descriptor

Alex Hung alex.hung at canonical.com
Wed May 8 02:13:55 UTC 2013


On 05/07/2013 03:46 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Coverity CID #997320: Free of address-of expression
>
> We should be just free'ing the items in the list and not the
> list descriptor because that is not on the heap.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/lib/src/fwts_framework.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 67dd3ab..857b54e 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -925,7 +925,7 @@ static int fwts_framework_filter_error_parse(const char *arg, fwts_list *list)
>   	for (str = (char*)arg; (token = strtok_r(str, ",", &saveptr)) != NULL; str = NULL) {
>   		if (fwts_list_append(list, token) == NULL) {
>   			fprintf(stderr, "Out of memory parsing argument %s\n", arg);
> -			fwts_list_free(list, NULL);
> +			fwts_list_free_items(list, NULL);
>   			return FWTS_ERROR;
>   		}
>   	}
>
Acked-by: Alex Hung <alex.hung at canonical.com>




More information about the fwts-devel mailing list