fix double free and segfault.
fix double free and segfault.


git-svn-id: 444ed946b9c2220da791e84c3dd156a05f92db99@2905 c6295689-39f2-0310-b995-f0e70906c6a9

tidatida/OpenSC,jpki/OpenSC,tidatida/OpenSC,LudovicRousseau/OpenSC,Jakuje/OpenSC,metsma/OpenSC,0x7678/myOpenSC,OpenSC/OpenSC,marschap/pkg-opensc,l1k/OpenSC,viktorTarasov/OpenSC-SM,0x7678/OpenSC,nmav/OpenSC,gemini/OpenSC,tidatida/OpenSC,germanblanco/OpenSC,fabled/OpenSC,dirkx/OpenSC.tokend,carlhoerberg/OpenSC,adminmt/OpenSC,UIKit0/OpenSC,carlhoerberg/OpenSC,AktivCo/OpenSC,dirkx/OpenSC.tokend,gentoo/OpenSC,ieugen/OpenSC,ieugen/OpenSC,gentoo/OpenSC,0x7678/OpenSC,UIKit0/OpenSC,kasparsd/opensc-latvia-id,frankmorgner/OpenSC,velter/OpenSC,dirkx/OpenSC,0x7678/OpenSC,philipWendland/OpenSC,dirkx/OpenSC,Jakuje/OpenSC,0x7678/myOpenSC,fabled/OpenSC,kasparsd/opensc-latvia-id,nmav/OpenSC,martinpaljak/OpenSC,CardContact/OpenSC,nmav/OpenSC,velter/OpenSC,philipWendland/OpenSC,aobaid/OpenSC,OpenSC/OpenSC,OpenSC/OpenSC,ieugen/OpenSC,financeX/OpenSC,aobaid/OpenSC,rickyepoderi/OpenSC,ieugen/OpenSC,dirkx/OpenSC,rickyepoderi/OpenSC,jpki/OpenSC,mtrojnar/OpenSC,mouse07410/OpenSC,frankmorgner/OpenSC,mouse07410/OpenSC,dirkx/OpenSC.tokend,martinpaljak/OpenSC,UIKit0/OpenSC,aobaid/OpenSC,mtrojnar/OpenSC,fabled/OpenSC,rickyepoderi/OpenSC,velter/OpenSC,dirkx/OpenSC.tokend,0x7678/myOpenSC,dengert/OpenSC,aobaid/OpenSC,AktivCo/OpenSC,mouse07410/OpenSC,Jakuje/OpenSC,CardContact/OpenSC,tidatida/OpenSC,dengert/OpenSC,financeX/OpenSC,0x7678/myOpenSC,philipWendland/OpenSC,marschap/pkg-opensc,metsma/OpenSC,carlhoerberg/OpenSC,hongquan/OpenSC-main,marschap/pkg-opensc,kasparsd/opensc-latvia-id,adminmt/OpenSC,dirkx/OpenSC,germanblanco/OpenSC,adminmt/OpenSC,germanblanco/OpenSC,hhonkanen/OpenSC,adminmt/OpenSC,gentoo/OpenSC,velter/OpenSC,fabled/OpenSC,0x7678/OpenSC,viktorTarasov/OpenSC-SM,viktorTarasov/OpenSC-SM,financeX/OpenSC,gemini/OpenSC,financeX/OpenSC,marschap/pkg-opensc,dirkx/OpenSC.tokend,LudovicRousseau/OpenSC,carlhoerberg/OpenSC,mtrojnar/OpenSC,hongquan/OpenSC-main,dengert/OpenSC,dirkx/OpenSC.tokend,ieugen/OpenSC,l1k/OpenSC,martinpaljak/OpenSC,dirkx/OpenSC,frankmorgner/OpenSC,metsma/OpenSC,Jakuje/OpenSC,frankmorgner/OpenSC,jpki/OpenSC,kasparsd/opensc-latvia-id,gemini/OpenSC,l1k/OpenSC,hhonkanen/OpenSC,hhonkanen/OpenSC,carlhoerberg/OpenSC,CardContact/OpenSC,gentoo/OpenSC,LudovicRousseau/OpenSC,gentoo/OpenSC,financeX/OpenSC,0x7678/myOpenSC,AktivCo/OpenSC,hongquan/OpenSC-main,UIKit0/OpenSC