I commited all simple parts to trunk so they don't get lost. > of course SC_TEST_RET can't free anything and hence this macro > shouldn't be used when memory needs to be freed on return
still needs to be replaced. > > > Index: src/pkcs11/framework-pkcs15.c > > =================================================================== > > --- src/pkcs11/framework-pkcs15.c (revision 2919) > > +++ src/pkcs11/framework-pkcs15.c (working copy) > > @@ -2345,6 +2345,7 @@ > > sc_debug(context, "data_len %i\n", data->data_len); > > check_attribute_buffer(attr, data->data_len); > > memcpy(attr->pValue, data->data, data->data_len); > > + free(data); > > } > > break; > > default: > > don't know checked the code again, l think it is right and commited it. > hmm, if sc_pkcs15init_update_dir() fails we still have a possible memory > leak (unfortunately it's not clear whether we need to free app or not when > sc_pkcs15init_update() returns an error) added a comment, fixed the simple case. > should we really discard the debug data when the printed value has been > truncated ? no. code is unchanged, needs a proper fix. Andreas _______________________________________________ opensc-devel mailing list [email protected] http://www.opensc-project.org/mailman/listinfo/opensc-devel
