summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ratp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ratp.c b/lib/ratp.c
index d596a0e..22e8363 100644
--- a/lib/ratp.c
+++ b/lib/ratp.c
@@ -1658,6 +1658,8 @@ int ratp_establish(struct ratp *ratp, bool active, int timeout_ms)
}
out:
+ ri->in_ratp--;
+
if (ret) {
free(ri->recvbuf);
free(ri->sendbuf);
@@ -1665,8 +1667,6 @@ out:
ratp->internal = NULL;
}
- ri->in_ratp--;
-
return ret;
}