diff mbox

[v1] validation: classification: fix unchecked return value

Message ID 1424662047-22687-1-git-send-email-bala.manoharan@linaro.org
State New
Headers show

Commit Message

Balasubramanian Manoharan Feb. 23, 2015, 3:27 a.m. UTC
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>

Fix for return value checking of odp_pool_destroy() function reported by Coverity.
https://bugs.linaro.org/show_bug.cgi?id=1142

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
---
 test/validation/classification/odp_classification_tests.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bill Fischofer Feb. 23, 2015, 3:31 a.m. UTC | #1
On Sun, Feb 22, 2015 at 9:27 PM, <bala.manoharan@linaro.org> wrote:

> From: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>
> Fix for return value checking of odp_pool_destroy() function reported by
> Coverity.
> https://bugs.linaro.org/show_bug.cgi?id=1142
>
> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  test/validation/classification/odp_classification_tests.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/test/validation/classification/odp_classification_tests.c
> b/test/validation/classification/odp_classification_tests.c
> index 564455c..a00477f 100644
> --- a/test/validation/classification/odp_classification_tests.c
> +++ b/test/validation/classification/odp_classification_tests.c
> @@ -288,7 +288,8 @@ int classification_tests_init(void)
>         return 0;
>
>  error_pktio_loop:
> -       odp_pool_destroy(pool_default);
> +       if (0 > odp_pool_destroy(pool_default))
> +               return -1;
>
>  error_pool_default:
>         return -1;
> --
> 2.0.1.472.g6f92e5f
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
diff mbox

Patch

diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c
index 564455c..a00477f 100644
--- a/test/validation/classification/odp_classification_tests.c
+++ b/test/validation/classification/odp_classification_tests.c
@@ -288,7 +288,8 @@  int classification_tests_init(void)
 	return 0;
 
 error_pktio_loop:
-	odp_pool_destroy(pool_default);
+	if (0 > odp_pool_destroy(pool_default))
+		return -1;
 
 error_pool_default:
 	return -1;