handover: Free allocated handover record if parsing fails
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Jun 2012 16:21:06 +0000 (18:21 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Jun 2012 16:21:06 +0000 (18:21 +0200)
plugins/handover.c

index 1cd68f8..9b919e4 100644 (file)
@@ -157,6 +157,8 @@ static int handover_ndef_parse(int client_fd, struct hr_ndef *ndef)
 fail:
        near_error("ndef parsing failed (%d)", err);
 
+       handover_close(client_fd, 0);
+
        return err;
 }