mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +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) {
|
||||
struct moduleLoadQueueEntry *loadmod =
|
||||
zmalloc(sizeof(struct moduleLoadQueueEntry)+sizeof(robj*)*argc);
|
||||
int i;
|
||||
struct moduleLoadQueueEntry *loadmod;
|
||||
|
||||
loadmod = zmalloc(sizeof(struct moduleLoadQueueEntry));
|
||||
loadmod->argv = zmalloc(sizeof(robj*)*argc);
|
||||
loadmod->path = sdsnew(path);
|
||||
loadmod->argc = argc;
|
||||
for (i = 0; i < argc; i++) {
|
||||
|
@ -686,7 +686,7 @@ struct saveparam {
|
||||
struct moduleLoadQueueEntry {
|
||||
sds path;
|
||||
int argc;
|
||||
robj *argv[];
|
||||
robj **argv;
|
||||
};
|
||||
|
||||
struct sharedObjectsStruct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user