diff options
Diffstat (limited to 'src/format/symbol.c')
-rw-r--r-- | src/format/symbol.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/format/symbol.c b/src/format/symbol.c index 898f00d..70a1d24 100644 --- a/src/format/symbol.c +++ b/src/format/symbol.c @@ -310,7 +310,13 @@ const char *g_binary_symbol_get_label(const GBinSymbol *symbol) void g_binary_symbol_set_alt_label(GBinSymbol *symbol, const char *alt) { - symbol->alt = strdup(alt); + if (symbol->alt != NULL) + free(symbol->alt); + + if (alt == NULL) + symbol->alt = NULL; + else + symbol->alt = strdup(alt); } @@ -493,7 +499,7 @@ void g_binary_symbol_attach_instruction(GBinSymbol *symbol, GArchInstruction *in * * * Description : Fournit l'éventuelle routine associée au symbole. * * * -* Retour : - * +* Retour : Instance GLib en place ou NULL si aucune. * * * * Remarques : Il n'y a pas de transfert de propriété ici ! * * * @@ -512,7 +518,7 @@ GBinRoutine *g_binary_symbol_get_routine(const GBinSymbol *symbol) * * * Description : Fournit l'éventuelle instruction associée au symbole. * * * -* Retour : - * +* Retour : Instance GLib en place ou NULL si aucune. * * * * Remarques : Il n'y a pas de transfert de propriété ici ! * * * @@ -551,7 +557,7 @@ void g_binary_symbol_set_comment(GBinSymbol *symbol, GDbComment *comment) * * * Description : Fournit l'éventuel commentaire associé au symbole. * * * -* Retour : - * +* Retour : Instance GLib en place ou NULL si aucune. * * * * Remarques : Il n'y a pas de transfert de propriété ici ! * * * |