stmhal: Bug fix for usocket's accept and setsockopt methods.
stmhal: Bug fix for usocket's accept and setsockopt methods.

accept might raise an exception, in which case the new socket is not
fully created.  It has a finaliser so will run close() method when GC'd.
Before this patch close would try to close an invalid socket.  Now
fixed.

setsockopt took address of stack value which became out of scope.  Now
fixed.

selste/micropython,selste/micropython,noahchense/micropython,praemdonck/micropython,cloudformdesign/micropython,infinnovation/micropython,hosaka/micropython,ahotam/micropython,selste/micropython,lbattraw/micropython,MrSurly/micropython,supergis/micropython,ernesto-g/micropython,mgyenik/micropython,bvernoux/micropython,SHA2017-badge/micropython-esp32,henriknelson/micropython,Vogtinator/micropython,heisewangluo/micropython,martinribelotta/micropython,selste/micropython,lbattraw/micropython,ahotam/micropython,slzatz/micropython,trezor/micropython,kerneltask/micropython,MrSurly/micropython,pfalcon/micropython,blmorris/micropython,tobbad/micropython,swegener/micropython,danicampora/micropython,skybird6672/micropython,cwyark/micropython,dinau/micropython,supergis/micropython,swegener/micropython,blazewicz/micropython,mhoffma/micropython,micropython/micropython-esp32,warner83/micropython,pozetroninc/micropython,ceramos/micropython,ChuckM/micropython,lbattraw/micropython,xyb/micropython,vitiral/micropython,xuxiaoxin/micropython,hiway/micropython,hosaka/micropython,noahwilliamsson/micropython,pozetroninc/micropython,vitiral/micropython,rubencabrera/micropython,turbinenreiter/micropython,cnoviello/micropython,adamkh/micropython,tuc-osg/micropython,redbear/micropython,firstval/micropython,xhat/micropython,tuc-osg/micropython,hosaka/micropython,cloudformdesign/micropython,matthewelse/micropython,warner83/micropython,ericsnowcurrently/micropython,tobbad/micropython,chrisdearman/micropython,utopiaprince/micropython,mhoffma/micropython,blmorris/micropython,adafruit/micropython,danicampora/micropython,ruffy91/micropython,praemdonck/micropython,blazewicz/micropython,deshipu/micropython,chrisdearman/micropython,ceramos/micropython,dinau/micropython,Peetz0r/micropython-esp32,ericsnowcurrently/micropython,swegener/micropython,Vogtinator/micropython,MrSurly/micropython-esp32,omtinez/micropython,adafruit/micropython,aethaniel/micropython,dxxb/micropython,ryannathans/micropython,blmorris/micropython,Timmenem/micropython,MrSurly/micropython,xyb/micropython,vitiral/micropython,noahchense/micropython,dxxb/micropython,cwyark/micropython,drrk/micropython,ChuckM/micropython,adafruit/circuitpython,MrSurly/micropython-esp32,henriknelson/micropython,oopy/micropython,deshipu/micropython,drrk/micropython,jlillest/micropython,pfalcon/micropython,hiway/micropython,feilongfl/micropython,AriZuu/micropython,vitiral/micropython,pramasoul/micropython,torwag/micropython,HenrikSolver/micropython,danicampora/micropython,matthewelse/micropython,ruffy91/micropython,paul-xxx/micropython,cwyark/micropython,Peetz0r/micropython-esp32,jimkmc/micropython,cloudformdesign/micropython,supergis/micropython,puuu/micropython,emfcamp/micropython,praemdonck/micropython,paul-xxx/micropython,neilh10/micropython,mpalomer/micropython,drrk/micropython,hosaka/micropython,toolmacher/micropython,stonegithubs/micropython,ernesto-g/micropython,dinau/micropython,dxxb/micropython,adafruit/circuitpython,ryannathans/micropython,emfcamp/micropython,SungEun-Steve-Kim/test-mp,infinnovation/micropython,tralamazza/micropython,feilongfl/micropython,jimkmc/micropython,rubencabrera/micropython,PappaPeppar/micropython,ChuckM/micropython,mpalomer/micropython,matthewelse/micropython,SungEun-Steve-Kim/test-mp,blazewicz/micropython,PappaPeppar/micropython,kostyll/micropython,xuxiaoxin/micropython,noahchense/micropython,infinnovation/micropython,oopy/micropython,cwyark/micropython,heisewangluo/micropython,mpalomer/micropython,toolmacher/micropython,oopy/micropython,torwag/micropython,adafruit/circuitpython,rubencabrera/micropython,heisewangluo/micropython,Vogtinator/micropython,HenrikSolver/micropython,trezor/micropython,lowRISC/micropython,galenhz/micropython,AriZuu/micropython,xyb/micropython,galenhz/micropython,xuxiaoxin/micropython,slzatz/micropython,firstval/micropython,alex-robbins/micropython,alex-robbins/micropython,Vogtinator/micropython,tralamazza/micropython,mhoffma/micropython,rubencabrera/micropython,mpalomer/micropython,trezor/micropython,aethaniel/micropython,lowRISC/micropython,blmorris/micropython,adafruit/micropython,ryannathans/micropython,SungEun-Steve-Kim/test-mp,oopy/micropython,adamkh/micropython,jlillest/micropython,TDAbboud/micropython,AriZuu/micropython,Vogtinator/micropython,galenhz/micropython,tralamazza/micropython,infinnovation/micropython,dxxb/micropython,MrSurly/micropython,omtinez/micropython,jimkmc/micropython,MrSurly/micropython-esp32,tdautc19841202/micropython,utopiaprince/micropython,henriknelson/micropython,puuu/micropython,suda/micropython,xyb/micropython,swegener/micropython,alex-robbins/micropython,orionrobots/micropython,cnoviello/micropython,mhoffma/micropython,mianos/micropython,kostyll/micropython,blazewicz/micropython,rubencabrera/micropython,swegener/micropython,matthewelse/micropython,alex-march/micropython,TDAbboud/micropython,cwyark/micropython,paul-xxx/micropython,stonegithubs/micropython,tdautc19841202/micropython,chrisdearman/micropython,feilongfl/micropython,stonegithubs/micropython,Peetz0r/micropython-esp32,mpalomer/micropython,praemdonck/micropython,jmarcelino/pycom-micropython,puuu/micropython,MrSurly/micropython,SungEun-Steve-Kim/test-mp,adamkh/micropython,aethaniel/micropython,tdautc19841202/micropython,ericsnowcurrently/micropython,deshipu/micropython,ericsnowcurrently/micropython,PappaPeppar/micropython,chrisdearman/micropython,lbattraw/micropython,vriera/micropython,jmarcelino/pycom-micropython,alex-robbins/micropython,PappaPeppar/micropython,lowRISC/micropython,slzatz/micropython,neilh10/micropython,skybird6672/micropython,SHA2017-badge/micropython-esp32,adafruit/circuitpython,Timmenem/micropython,emfcamp/micropython,SHA2017-badge/micropython-esp32,torwag/micropython,tuc-osg/micropython,pfalcon/micropython,ahotam/micropython,tdautc19841202/micropython,trezor/micropython,TDAbboud/micropython,skybird6672/micropython,alex-march/micropython,pozetroninc/micropython,dhylands/micropython,martinribelotta/micropython,danicampora/micropython,xhat/micropython,ceramos/micropython,paul-xxx/micropython,xuxiaoxin/micropython,kostyll/micropython,slzatz/micropython,adafruit/circuitpython,redbear/micropython,aethaniel/micropython,deshipu/micropython,feilongfl/micropython,selste/micropython,misterdanb/micropython,suda/micropython,orionrobots/micropython,aethaniel/micropython,tralamazza/micropython,trezor/micropython,omtinez/micropython,noahchense/micropython,lowRISC/micropython,alex-march/micropython,deshipu/micropython,warner83/micropython,kerneltask/micropython,Peetz0r/micropython-esp32,noahwilliamsson/micropython,alex-march/micropython,neilh10/micropython,mianos/micropython,cnoviello/micropython,toolmacher/micropython,cloudformdesign/micropython,martinribelotta/micropython,ruffy91/micropython,EcmaXp/micropython,mhoffma/micropython,pramasoul/micropython,ganshun666/micropython,ruffy91/micropython,SungEun-Steve-Kim/test-mp,Timmenem/micropython,oopy/micropython,henriknelson/micropython,kostyll/micropython,pramasoul/micropython,suda/micropython,ChuckM/micropython,supergis/micropython,dmazzella/micropython,jlillest/micropython,stonegithubs/micropython,suda/micropython,hiway/micropython,vriera/micropython,neilh10/micropython,TDAbboud/micropython,noahchense/micropython,jmarcelino/pycom-micropython,redbear/micropython,ryannathans/micropython,ahotam/micropython,xuxiaoxin/micropython,misterdanb/micropython,micropython/micropython-esp32,TDAbboud/micropython,tobbad/micropython,warner83/micropython,EcmaXp/micropython,firstval/micropython,noahwilliamsson/micropython,micropython/micropython-esp32,chrisdearman/micropython,henriknelson/micropython,puuu/micropython,vriera/micropython,AriZuu/micropython,jmarcelino/pycom-micropython,neilh10/micropython,xhat/micropython,ericsnowcurrently/micropython,Peetz0r/micropython-esp32,KISSMonX/micropython,mgyenik/micropython,martinribelotta/micropython,noahwilliamsson/micropython,ernesto-g/micropython,torwag/micropython,mgyenik/micropython,dhylands/micropython,alex-robbins/micropython,adamkh/micropython,cnoviello/micropython,noahwilliamsson/micropython,matthewelse/micropython,adafruit/micropython,adafruit/circuitpython,galenhz/micropython,adamkh/micropython,blazewicz/micropython,KISSMonX/micropython,dhylands/micropython,PappaPeppar/micropython,ahotam/micropython,cnoviello/micropython,ernesto-g/micropython,blmorris/micropython,xyb/micropython,ganshun666/micropython,emfcamp/micropython,pramasoul/micropython,mgyenik/micropython,dmazzella/micropython,martinribelotta/micropython,KISSMonX/micropython,MrSurly/micropython-esp32,torwag/micropython,mianos/micropython,KISSMonX/micropython,misterdanb/micropython,infinnovation/micropython,cloudformdesign/micropython,ceramos/micropython,omtinez/micropython,AriZuu/micropython,utopiaprince/micropython,SHA2017-badge/micropython-esp32,tuc-osg/micropython,micropython/micropython-esp32,xhat/micropython,mgyenik/micropython,mianos/micropython,turbinenreiter/micropython,hosaka/micropython,kostyll/micropython,tobbad/micropython,heisewangluo/micropython,orionrobots/micropython,bvernoux/micropython,vriera/micropython,turbinenreiter/micropython,ernesto-g/micropython,jlillest/micropython,dinau/micropython,HenrikSolver/micropython,ganshun666/micropython,orionrobots/micropython,jimkmc/micropython,HenrikSolver/micropython,jmarcelino/pycom-micropython,pramasoul/micropython,ganshun666/micropython,vriera/micropython,lbattraw/micropython,toolmacher/micropython,danicampora/micropython,heisewangluo/micropython,hiway/micropython,utopiaprince/micropython,paul-xxx/micropython,ryannathans/micropython,tuc-osg/micropython,praemdonck/micropython,ruffy91/micropython,firstval/micropython,slzatz/micropython,omtinez/micropython,skybird6672/micropython,pozetroninc/micropython,pfalcon/micropython,emfcamp/micropython,micropython/micropython-esp32,warner83/micropython,dmazzella/micropython,mianos/micropython,tobbad/micropython,redbear/micropython,matthewelse/micropython,feilongfl/micropython,bvernoux/micropython,jimkmc/micropython,misterdanb/micropython,alex-march/micropython,kerneltask/micropython,KISSMonX/micropython,pozetroninc/micropython,EcmaXp/micropython,hiway/micropython,puuu/micropython,suda/micropython,ceramos/micropython,firstval/micropython,Timmenem/micropython,utopiaprince/micropython,dinau/micropython,supergis/micropython,EcmaXp/micropython,ganshun666/micropython,misterdanb/micropython,lowRISC/micropython,turbinenreiter/micropython,adafruit/micropython,pfalcon/micropython,turbinenreiter/micropython,dxxb/micropython,orionrobots/micropython,drrk/micropython,galenhz/micropython,HenrikSolver/micropython,dhylands/micropython,jlillest/micropython,kerneltask/micropython,dmazzella/micropython,skybird6672/micropython,drrk/micropython,EcmaXp/micropython,bvernoux/micropython,vitiral/micropython,kerneltask/micropython,dhylands/micropython,redbear/micropython,toolmacher/micropython,xhat/micropython,ChuckM/micropython,MrSurly/micropython-esp32,tdautc19841202/micropython,stonegithubs/micropython,Timmenem/micropython,bvernoux/micropython,SHA2017-badge/micropython-esp32