Skip to content

Commit 7512ae8

Browse files
committed
Don't use strdup (non portable)
1 parent 946ef49 commit 7512ae8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ namespace Sass {
133133

134134
Context::~Context()
135135
{
136-
// resources were allocated by strdup or malloc
136+
// resources were allocated by malloc
137137
for (size_t i = 0; i < resources.size(); ++i) {
138138
free(resources[i].contents);
139139
free(resources[i].srcmap);

src/sass_functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extern "C" {
1818
{
1919
Sass_Function_Entry cb = (Sass_Function_Entry) calloc(1, sizeof(Sass_Function));
2020
if (cb == 0) return 0;
21-
cb->signature = strdup(signature);
21+
cb->signature = sass_copy_c_string(signature);
2222
cb->function = function;
2323
cb->cookie = cookie;
2424
return cb;

0 commit comments

Comments
 (0)