diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-09-22 23:10:48 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-09-22 23:10:48 +0000 |
commit | 12862715c961bf6dabce2ed4e58da58e5dfe8c6b (patch) | |
tree | 338a768117c0738d963024169dff4c22435428dd /src/sdp.c | |
parent | c15d73bdb64196dee440476b5c3c031ee52c2373 (diff) |
Fix errno overwrite problems
Diffstat (limited to 'src/sdp.c')
-rw-r--r-- | src/sdp.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3160,6 +3160,7 @@ static inline int sdp_is_local(const bdaddr_t *device) sdp_session_t *sdp_connect(const bdaddr_t *src, const bdaddr_t *dst, uint32_t flags) { + int err; sdp_session_t *session = malloc(sizeof(sdp_session_t)); if (!session) return session; @@ -3204,8 +3205,10 @@ sdp_session_t *sdp_connect(const bdaddr_t *src, const bdaddr_t *dst, uint32_t fl } } fail: + err = errno; if (session->sock >= 0) close(session->sock); free(session); + errno = err; return 0; } |