summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-07-20 13:30:18 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-08-13 13:19:52 -0300
commit2b38cf2e033d90fb50fc967f535935b170dc507d (patch)
tree1ac9ec5b947b22ceba04eea19d134458a1c40732 /error.c
parent5f0f0e13e1f714704d96f04050674c3102376409 (diff)
qerror: qerror_format(): return an allocated string
Simplifies current and future users. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'error.c')
-rw-r--r--error.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/error.c b/error.c
index 58f55a012e..3a62592261 100644
--- a/error.c
+++ b/error.c
@@ -65,10 +65,7 @@ bool error_is_set(Error **errp)
const char *error_get_pretty(Error *err)
{
if (err->msg == NULL) {
- QString *str;
- str = qerror_format(err->fmt, err->obj);
- err->msg = g_strdup(qstring_get_str(str));
- QDECREF(str);
+ err->msg = qerror_format(err->fmt, err->obj);
}
return err->msg;