add_handle(): Fix a memory leak.
commit948f63f0fd0530c8653aa801f7e3d8a2cf2b12b2
authorUwe Hermann <uwe@hermann-uwe.de>
Fri, 3 Apr 2015 15:17:49 +0000 (3 17:17 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Fri, 3 Apr 2015 15:51:41 +0000 (3 17:51 +0200)
treef7787b07d66464007bba5ca9c4b1e90f67907966
parent5122d608492d43d48f00e1fc13817f69eaa2a8b8
add_handle(): Fix a memory leak.

This fixes the following scan-build warning:

  serialport.c:1170:3: warning: Potential leak of memory pointed to by 'new_handles'
                  RETURN_ERROR(SP_ERR_MEM, "Mask array realloc() failed");
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
serialport.c