aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-04-23 16:43:07 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-04-23 23:44:32 +0200
commit62c3f436a96e2102ec5c1e3af974c8e57fe4e76c (patch)
tree2de27333fc54d46cd61174b43e64363817a9ae23 /src
parent2a49163103827465f25810f5f4e3d4305159f209 (diff)
downloadrneovim-62c3f436a96e2102ec5c1e3af974c8e57fe4e76c.tar.gz
rneovim-62c3f436a96e2102ec5c1e3af974c8e57fe4e76c.tar.bz2
rneovim-62c3f436a96e2102ec5c1e3af974c8e57fe4e76c.zip
api_clear_error: Skip if error was not set.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/api/private/helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index 547ac29bed..3bf584ff2f 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -803,6 +803,9 @@ void api_free_dictionary(Dictionary value)
void api_clear_error(Error *value)
FUNC_ATTR_NONNULL_ALL
{
+ if (!value->set) {
+ return;
+ }
xfree(value->msg);
value->msg = NULL;
}