diff options
Diffstat (limited to 'src/providers/data_provider_be.c')
-rw-r--r-- | src/providers/data_provider_be.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c index f952faba..27a4571a 100644 --- a/src/providers/data_provider_be.c +++ b/src/providers/data_provider_be.c @@ -672,13 +672,10 @@ static int be_pam_handler(DBusMessage *message, struct sbus_connection *conn) be_req->fn = be_pam_handler_callback; be_req->pvt = reply; - dbus_error_init(&dbus_error); - - ret = dp_unpack_pam_request(message, be_req, &pd, &dbus_error); - if (!ret) { - DEBUG(1,("Failed, to parse message!\n")); + pd = talloc_zero(be_req, struct pam_data); + if (!pd) { talloc_free(be_req); - return EIO; + return ENOMEM; } pd->pam_status = PAM_SYSTEM_ERR; @@ -688,6 +685,14 @@ static int be_pam_handler(DBusMessage *message, struct sbus_connection *conn) return ENOMEM; } + dbus_error_init(&dbus_error); + + ret = dp_unpack_pam_request(message, pd, &dbus_error); + if (!ret) { + DEBUG(1,("Failed, to parse message!\n")); + talloc_free(be_req); + return EIO; + } DEBUG(4, ("Got request with the following data\n")); DEBUG_PAM_DATA(4, pd); |