diff options
author | Vincent Torri <vincent.torri@gmail.com> | 2017-12-11 15:06:02 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-12-11 16:04:02 +0900 |
commit | 771bb6e6a79113fe86b9bd641d1418a78aee81ae (patch) | |
tree | f1dccef88a7d64f06191a779f9e5080497bfcb57 /src/lib/evil/evil_dlfcn.c | |
parent | 196b6f1ba48bf06a11c0017e43550583a05d00f5 (diff) |
Evil: use static buffer to store error messages
Reviewers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D5394
Diffstat (limited to 'src/lib/evil/evil_dlfcn.c')
-rw-r--r-- | src/lib/evil/evil_dlfcn.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/evil/evil_dlfcn.c b/src/lib/evil/evil_dlfcn.c index fe1dc7d..1a7db5e 100644 --- a/src/lib/evil/evil_dlfcn.c +++ b/src/lib/evil/evil_dlfcn.c | |||
@@ -24,7 +24,7 @@ static int _dl_err_viewed = 0; | |||
24 | static void | 24 | static void |
25 | _dl_get_last_error(char *desc) | 25 | _dl_get_last_error(char *desc) |
26 | { | 26 | { |
27 | char *str; | 27 | const char *str; |
28 | size_t l1; | 28 | size_t l1; |
29 | size_t l2; | 29 | size_t l2; |
30 | 30 | ||
@@ -45,7 +45,6 @@ _dl_get_last_error(char *desc) | |||
45 | memcpy(_dl_err + l1, str, l2); | 45 | memcpy(_dl_err + l1, str, l2); |
46 | _dl_err[l1 + l2] = '\0'; | 46 | _dl_err[l1 + l2] = '\0'; |
47 | } | 47 | } |
48 | free(str); | ||
49 | _dl_err_viewed = 0; | 48 | _dl_err_viewed = 0; |
50 | } | 49 | } |
51 | 50 | ||