diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2012-06-28 18:37:50 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-06-28 18:37:50 +0200 |
commit | c5f8e9859ff9875ea896252ba0d361af72f1bb28 (patch) | |
tree | d719eda9913f84897b908f466f4a1d3744b708c1 | |
parent | d4c3faa5ce8734c92c47ab2cd2eac5fe072a10ab (diff) | |
download | neard-c5f8e9859ff9875ea896252ba0d361af72f1bb28.tar.gz neard-c5f8e9859ff9875ea896252ba0d361af72f1bb28.tar.bz2 neard-c5f8e9859ff9875ea896252ba0d361af72f1bb28.zip |
handover: Free handover records
-rw-r--r-- | plugins/handover.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/handover.c b/plugins/handover.c index 9b919e4..8f09afd 100644 --- a/plugins/handover.c +++ b/plugins/handover.c @@ -145,15 +145,19 @@ static int handover_ndef_parse(int client_fd, struct hr_ndef *ndef) near_info("Send Hs frame"); err = send(client_fd, msg->data, msg->length, MSG_DONTWAIT); if (err >= 0) - return 0; + err = 0; } else { /* We received a Hs frame */ DBG("Close handover connection"); handover_close(client_fd, 0); - return 0; + err = 0; } + near_ndef_records_free(records); + + return err; + fail: near_error("ndef parsing failed (%d)", err); |