Projects STRLCPY criu Commits c48099d8
🤬
  • image: Introduce collect-nofree flag

    Current collect helper frees the pb entry if there's
    zero priv_size on cinfo. For files we'll have zero
    priv_size (as entries will be collected by sub-cinfos),
    while the entry in question should NOT be freed.
    
    Signed-off-by: Pavel Emelyanov <[email protected]>
    Signed-off-by: Andrei Vagin <[email protected]>
  • Loading...
  • Pavel Emelyanov committed 7 years ago
    c48099d8
    1 parent 80e146da
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    criu/include/protobuf.h
    skipped 35 lines
    36 36  };
    37 37   
    38 38  #define COLLECT_SHARED 0x1 /* use shared memory for obj-s */
     39 +#define COLLECT_NOFREE 0x2 /* don't free entry after callback */
    39 40  #define COLLECT_HAPPENED 0x4 /* image was opened and collected */
    40 41   
    41 42  extern int collect_image(struct collect_image_info *);
    skipped 3 lines
  • ■ ■ ■ ■
    criu/protobuf.c
    skipped 216 lines
    217 217   break;
    218 218   }
    219 219   
    220  - if (!cinfo->priv_size)
     220 + if (!cinfo->priv_size && !(cinfo->flags & COLLECT_NOFREE))
    221 221   cr_pb_descs[cinfo->pb_type].free(msg, NULL);
    222 222   }
    223 223   
    skipped 5 lines
Please wait...
Page is in error, reload to recover