OSDN Git Service

agent: Free the agent request properly
authorSyam Sidhardhan <s.syam@samsung.com>
Thu, 12 Apr 2012 15:02:54 +0000 (20:32 +0530)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 13 Apr 2012 09:36:31 +0000 (12:36 +0300)
In the case of error, Unref the req->msg which is allocated inside the
pincode_request_new()

src/agent.c

index 41eb3a8..7f2d13c 100644 (file)
@@ -457,7 +457,7 @@ int agent_request_pincode(struct agent *agent, struct btd_device *device,
        return 0;
 
 failed:
-       g_free(req);
+       agent_request_free(req, FALSE);
        return err;
 }