mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Don't assume no padding or specific ordering in moduleLoadQueueEntry structure.
We need to be free to shuffle fields or add more fields in a structure without breaking code. Related to issue #3293.
This commit is contained in:
parent
9a02dac2e8
commit
a4bce77e92
@ -154,10 +154,11 @@ void resetServerSaveParams(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void queueLoadModule(sds path, sds *argv, int argc) {
|
void queueLoadModule(sds path, sds *argv, int argc) {
|
||||||
struct moduleLoadQueueEntry *loadmod =
|
|
||||||
zmalloc(sizeof(struct moduleLoadQueueEntry)+sizeof(robj*)*argc);
|
|
||||||
int i;
|
int i;
|
||||||
|
struct moduleLoadQueueEntry *loadmod;
|
||||||
|
|
||||||
|
loadmod = zmalloc(sizeof(struct moduleLoadQueueEntry));
|
||||||
|
loadmod->argv = zmalloc(sizeof(robj*)*argc);
|
||||||
loadmod->path = sdsnew(path);
|
loadmod->path = sdsnew(path);
|
||||||
loadmod->argc = argc;
|
loadmod->argc = argc;
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
|
@ -686,7 +686,7 @@ struct saveparam {
|
|||||||
struct moduleLoadQueueEntry {
|
struct moduleLoadQueueEntry {
|
||||||
sds path;
|
sds path;
|
||||||
int argc;
|
int argc;
|
||||||
robj *argv[];
|
robj **argv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sharedObjectsStruct {
|
struct sharedObjectsStruct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user