cyrusimap / cyrus-sasl

Other
128 stars 146 forks source link

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

Open julek-wolfssl opened 1 month ago

julek-wolfssl commented 1 month 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 1 month ago

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