diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/java-utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/java-utils.c b/src/java-utils.c index 1efcb3f..7fa0ff3 100644 --- a/src/java-utils.c +++ b/src/java-utils.c @@ -309,7 +309,9 @@ get_package_name_from_class_file (char *fname) for (j = length; (j >= 0) && (end == 0); j--) if (package[j] == '/') end = j; - package = g_strndup (package, end); + char *package_padded = g_strndup (package, end); + g_free(package); + package = package_padded; } java_class_file_free (cfile); |