device/adsl: restore brfd value on error in br2684_assign_vcc()

Warned by coverity: we assert above that brfd is -1, so we must always
restore it to -1 in the error case.

Technically, not a problem because socket() is documented to return
only -1 on error already. Apparently coverity does not believe that.

(cherry picked from commit 5b9a848a82)
This commit is contained in:
Thomas Haller
2019-08-02 09:09:45 +02:00
parent 702224ec0b
commit fec1c760ec

View File

@@ -155,6 +155,7 @@ br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl)
if (priv->brfd < 0) {
errsv = errno;
_LOGE (LOGD_ADSL, "failed to open ATM control socket (%d)", errsv);
priv->brfd = -1;
return FALSE;
}