In rigctld do not try to close fsockin/fsockout when null -- happens during error on fsockin or fsockout

https://github.com/Hamlib/Hamlib/issues/757
pull/769/head
Mike Black W9MDB 2021-08-05 07:50:15 -05:00
rodzic 1668fd7954
commit 5cab1acc0d
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -22,3 +22,6 @@ Here is the list of the brave fellows:
* Charles Suprin AA1VS, v1.2.12, 02/2011, all user programs/daemons
$ rigctl -C MGP
* Chuck Ritola
fclose of fsockin or fsockout when null
https://github.com/Hamlib/Hamlib/issues/757

Wyświetl plik

@ -1221,8 +1221,8 @@ handle_exit:
if (retcode != 0) { rig_debug(RIG_DEBUG_ERR, "%s: fclose(fsockin) %s\n", __func__, strerror(retcode)); }
#endif
fclose(fsockin);
fclose(fsockout);
if (fsockin) fclose(fsockin);
if (fsockout) fclose(fsockout);
// for everybody else we close the handle after fclose
#ifndef __MINGW32__