Disclaimer: I could not complie-test or runtime-test these patches right now. This is a pure code-only review of the patches.
This patch seems to be correct. I'd move both frees to keep them together, but that's a matter of taste. Am Mittwoch, den 09.04.2014, 15:41 -0300 schrieb [email protected]: > From: Richard Maciel <[email protected]> > > Related to coverit CID 10331. > > free call being executed over pointer, before the > LogError which used it. > > Signed-off-by: Richard Maciel <[email protected]> > --- > src/tcs/tcs_evlog_imaem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/tcs/tcs_evlog_imaem.c b/src/tcs/tcs_evlog_imaem.c > index 5cb8d20..1771dbc 100644 > --- a/src/tcs/tcs_evlog_imaem.c > +++ b/src/tcs/tcs_evlog_imaem.c > @@ -293,9 +293,9 @@ ima_get_entry(FILE *handle, UINT32 pcr_index, UINT32 > *num, TSS_PCR_EVENT **ppEve > event->rgbEvent = malloc(event->ulEventLength + > 1); > if (event->rgbEvent == NULL) { > free(event->rgbPcrValue); > - free(event); > LogError("malloc of %u bytes failed.", > event->ulEventLength); > + free(event); > result = TCSERR(TSS_E_OUTOFMEMORY); > goto done; > } ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ TrouSerS-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/trousers-tech
