[OpenSIPS-Devel] [OpenSIPS/opensips] e948b6: db_mysql: Do not read freed PKG memory after 1st f...

Liviu Chircu noreply at github.com
Wed Dec 7 16:40:45 UTC 2022


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: e948b6e0baae5e963687caa2b60cc28da724fca4
      https://github.com/OpenSIPS/opensips/commit/e948b6e0baae5e963687caa2b60cc28da724fca4
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M modules/db_mysql/my_con.c

  Log Message:
  -----------
  db_mysql: Do not read freed PKG memory after 1st failed reconnect

During db_mysql_connect(), make sure to reset the "init" status after
free'ing ptr->con.  Per MySQL 5.7 docs on mysql_close():

    "Closes a previously opened connection.
	... Do not use the handler after it has been closed."

(cherry picked from commit d616ed3f979100639ed43e45fd3123ccba787535)





More information about the Devel mailing list