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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user