Check for NULL before dereferencing.
Check for NULL before dereferencing.

Reported by STACK

http://css.csail.mit.edu/stack/

Change-Id: Id7959c8217f46313ecf35a271efaf5f703fde2dc

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