Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2041)

Unified Diff: dbus_service.cc

Issue 3437019: [update_engine] handle NULL returns from strdup (Closed) Base URL: http://git.chromium.org/git/update_engine.git
Patch Set: fixed nits. Pushing... Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | subprocess.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus_service.cc
diff --git a/dbus_service.cc b/dbus_service.cc
index d5bf13f5243736acf5f18f23f36719f045ad7aef..677dbc85990469fdb8e1a293bd833b1acf5268ea 100644
--- a/dbus_service.cc
+++ b/dbus_service.cc
@@ -77,6 +77,10 @@ gboolean update_engine_service_get_status(UpdateEngineService* self,
*current_operation = strdup(current_op.c_str());
*new_version = strdup(new_version_str.c_str());
+ if (!(*current_operation && *new_version)) {
+ *error = NULL;
+ return FALSE;
+ }
return TRUE;
}
« no previous file with comments | « no previous file | subprocess.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698