Message ID | 1414179993-12296-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | Accepted |
Commit | fb47c0d266e6a48e507270f4c18182ce7d9b7646 |
Headers | show |
ping On 24 October 2014 15:46, Mike Holmes <mike.holmes@linaro.org> wrote: > On data mismatch free the recently mallocked buffer. > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > test/api_test/odp_ring_test.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c > index 1da5845..eb1f301 100644 > --- a/test/api_test/odp_ring_test.c > +++ b/test/api_test/odp_ring_test.c > @@ -286,6 +286,7 @@ static int consumer_fn(void) > if (i == 0) { > for (i = 0; i < MAX_BULK; i++) { > if (src[i] != (void *)(unsigned long)i) { > + free(src); > printf("data mismatch.. lockless > ops fail\n"); > return -1; > } > -- > 2.1.0 > >
> On 24 October 2014 15:46, Mike Holmes <mike.holmes@linaro.org> wrote: > >> On data mismatch free the recently mallocked buffer. >> >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >> --- >> test/api_test/odp_ring_test.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c >> index 1da5845..eb1f301 100644 >> --- a/test/api_test/odp_ring_test.c >> +++ b/test/api_test/odp_ring_test.c >> @@ -286,6 +286,7 @@ static int consumer_fn(void) >> if (i == 0) { >> for (i = 0; i < MAX_BULK; i++) { >> if (src[i] != (void *)(unsigned long)i) { >> + free(src); >> printf("data mismatch.. lockless >> ops fail\n"); >> return -1; >> } >> > +1, Reviewed-by: Santosh Shukla <santosh.shukla@linaro.org> -- >> 2.1.0 >> >> > > > -- > *Mike Holmes* > Linaro Sr Technical Manager > LNG - ODP > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp > >
Merged! Maxim. On 10/24/2014 11:46 PM, Mike Holmes wrote: > On data mismatch free the recently mallocked buffer. > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > test/api_test/odp_ring_test.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c > index 1da5845..eb1f301 100644 > --- a/test/api_test/odp_ring_test.c > +++ b/test/api_test/odp_ring_test.c > @@ -286,6 +286,7 @@ static int consumer_fn(void) > if (i == 0) { > for (i = 0; i < MAX_BULK; i++) { > if (src[i] != (void *)(unsigned long)i) { > + free(src); > printf("data mismatch.. lockless ops fail\n"); > return -1; > }
diff --git a/test/api_test/odp_ring_test.c b/test/api_test/odp_ring_test.c index 1da5845..eb1f301 100644 --- a/test/api_test/odp_ring_test.c +++ b/test/api_test/odp_ring_test.c @@ -286,6 +286,7 @@ static int consumer_fn(void) if (i == 0) { for (i = 0; i < MAX_BULK; i++) { if (src[i] != (void *)(unsigned long)i) { + free(src); printf("data mismatch.. lockless ops fail\n"); return -1; }
On data mismatch free the recently mallocked buffer. Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- test/api_test/odp_ring_test.c | 1 + 1 file changed, 1 insertion(+)