From 9b09073259f2eb88c0aa13d2c9cce4b7e550e452 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Fri, 29 Mar 2013 15:28:51 +0000 Subject: [PATCH] mon: Monitor: check if 'pss' arg is !NULL on parse_pos_long() We already do it all throughout the function, but this one place didn't. Signed-off-by: Joao Eduardo Luis --- src/mon/Monitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index e2015456dcdcd..d8d4579f67b1d 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -93,7 +93,8 @@ const string Monitor::MONITOR_STORE_PREFIX = "monitor_store"; long parse_pos_long(const char *s, ostream *pss) { if (*s == '-' || *s == '+') { - *pss << "expected numerical value, got: " << s; + if (pss) + *pss << "expected numerical value, got: " << s; return -EINVAL; } -- 2.39.5