Fix bug when saving the receipt file using a .DEC filename as template
authorSergio Durigan Junior <sergiodj@sergiodj.net>
Tue, 29 Apr 2014 00:11:19 +0000 (21:11 -0300)
committerSergio Durigan Junior <sergiodj@sergiodj.net>
Tue, 29 Apr 2014 00:11:19 +0000 (21:11 -0300)
commitd5b34437e83639b89c85ad2a509e8cfd5adde78a
treeef57c81a3aa568307c78d1d9e32d265530977f31
parentafa747c3ea14d39417463b1694d5261f64d10424
Fix bug when saving the receipt file using a .DEC filename as template

This commit fixes a bug that happens when the user provides a .DEC
filename to be transmitted, and rnetclient uses this filename to compose
the receipt (.REC) filename to be saved.  I forgot to use "basename" to
extract only the .DEC filename (and strip all the other paths) before using
it to build the .REC full path.  As an addition, this commit also fixes
a small memory leak.  Tested by sending a declaration again.
rnetclient.c