cyrusimap / cyrus-sasl

Other
134 stars 151 forks source link

db_lmdb.c: correctly track if SASLDB_FREEPATH needs to be called #840

Closed julek-wolfssl closed 4 months ago

julek-wolfssl commented 5 months ago

When the getopt(cntxt, NULL, "sasldb_path", &p, NULL) path is taken then SASLDB_FREEPATH is called on a value that can't be free'd and causes a segfault.

hyc commented 5 months ago

The patch is a bit verbose, I would have just called the flag do_freepath but otherwise fine.