diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2010-12-30 14:54:04 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2010-12-30 14:54:04 +0000 |
commit | 4869dd85d3853184a42fe66ceded941dfbd148b3 (patch) | |
tree | c0b8ec0813205fabb7f268eb09bdf51706b2cfe3 | |
parent | 9cefc971f8facc88a8597242bc17ae38d22f04c5 (diff) | |
download | libgdata-4869dd85d3853184a42fe66ceded941dfbd148b3.tar.gz |
core: Don't use deallocated memory
When authenticating asynchronously, don't attempt to use the username and
password from the asynchronous closure after it's been implicitly deallocated
by changing the result value of the GSimpleAsyncResult.
See: bgo#635736
-rw-r--r-- | gdata/gdata-service.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdata/gdata-service.c b/gdata/gdata-service.c index e3861272..dec5ec94 100644 --- a/gdata/gdata-service.c +++ b/gdata/gdata-service.c @@ -814,15 +814,13 @@ authenticate_thread (GSimpleAsyncResult *result, GDataService *service, GCancell /* Authenticate and return */ success = authenticate (service, data->username, data->password, NULL, NULL, cancellable, &error); + set_authentication_details (service, data->username, data->password, success); g_simple_async_result_set_op_res_gboolean (result, success); if (success == FALSE) { g_simple_async_result_set_from_error (result, error); g_error_free (error); } - - /* Update the authentication details held by the service (protected by a mutex) */ - set_authentication_details (service, data->username, data->password, success); } /** |