pidgin/pidgin

fix use after free
release-2.x.y
2022-06-02, ivanhoe
6fe6bf9a695b
fix use after free

This fixes an invalid read showing up in valgrind when opening some conversations in Pidgin and the closing Pidgin.
The code was introduced with /r/1342. It looks pretty straightforward so I hope I'm not messing with the fixes that were done in that RR.

Testing Done:
Started Pidgin in valgrind, opened some conversations and closed Pidgin again. No more invalid reads are shown.

Reviewed at https://reviews.imfreedom.org/r/1488/
/**
* finch
*
* Finch is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _GNT_UI_H
#define _GNT_UI_H
#include "gnt.h"
void gnt_ui_init(void);
void gnt_ui_uninit(void);
#endif