diff options
author | onefang | 2020-04-23 18:27:25 +1000 |
---|---|---|
committer | onefang | 2020-04-23 18:27:25 +1000 |
commit | c75fef4cb61d46d0b448654ef85c326d13d97222 (patch) | |
tree | 66c7d01eaa4e45a0fe14c2a16429020ff8517f13 | |
parent | Trying to track down MariaDB leaks. (diff) | |
download | opensim-SC_OLD-c75fef4cb61d46d0b448654ef85c326d13d97222.zip opensim-SC_OLD-c75fef4cb61d46d0b448654ef85c326d13d97222.tar.gz opensim-SC_OLD-c75fef4cb61d46d0b448654ef85c326d13d97222.tar.bz2 opensim-SC_OLD-c75fef4cb61d46d0b448654ef85c326d13d97222.tar.xz |
Maybe fix that DB crash?
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index d7b57c3..263dd8e 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -1130,7 +1130,7 @@ W("Allocated %d %d inBinds for %s", i, req->inCount, req->sql); | |||
1130 | // For some gotchas about all of this binding bit. | 1130 | // For some gotchas about all of this binding bit. |
1131 | req->inBind[i].buffer_type = fld->type; | 1131 | req->inBind[i].buffer_type = fld->type; |
1132 | req->inBind[i].buffer = xzalloc(fld->length + 1); // Note the + 1 is for string types, and a waste for the rest. | 1132 | req->inBind[i].buffer = xzalloc(fld->length + 1); // Note the + 1 is for string types, and a waste for the rest. |
1133 | req->inBind[i].buffer_length = fld->length; | 1133 | req->inBind[i].buffer_length = fld->length + 1; |
1134 | switch(fld->type) | 1134 | switch(fld->type) |
1135 | { | 1135 | { |
1136 | case MYSQL_TYPE_TINY: | 1136 | case MYSQL_TYPE_TINY: |
@@ -1272,7 +1272,7 @@ W("Allocated %d %d outBinds for %s", i, req->outCount, req->sql); | |||
1272 | // For some gotchas about all of this binding bit. | 1272 | // For some gotchas about all of this binding bit. |
1273 | req->outBind[i].buffer_type = fld->type; | 1273 | req->outBind[i].buffer_type = fld->type; |
1274 | req->outBind[i].buffer = xzalloc(fld->length + 1); // Note the + 1 is for string types, and a waste for the rest. | 1274 | req->outBind[i].buffer = xzalloc(fld->length + 1); // Note the + 1 is for string types, and a waste for the rest. |
1275 | req->outBind[i].buffer_length = fld->length; | 1275 | req->outBind[i].buffer_length = fld->length + 1; |
1276 | req->outBind[i].error = xzalloc(sizeof(my_bool)); | 1276 | req->outBind[i].error = xzalloc(sizeof(my_bool)); |
1277 | req->outBind[i].is_null = xzalloc(sizeof(my_bool)); | 1277 | req->outBind[i].is_null = xzalloc(sizeof(my_bool)); |
1278 | switch(fld->type) | 1278 | switch(fld->type) |