summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c4
-rw-r--r--src/pacman/conf.c4
-rw-r--r--src/pacman/util.c1
-rw-r--r--src/util/pacsort.c1
4 files changed, 7 insertions, 3 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 4993382d..d566d738 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -269,9 +269,11 @@ void cb_event(alpm_event_t *event)
case ALPM_EVENT_OPTDEP_REMOVAL:
{
alpm_event_optdep_removal_t *e = &event->optdep_removal;
+ char *dep_string = alpm_dep_compute_string(e->optdep);
colon_printf(_("%s optionally requires %s\n"),
alpm_pkg_get_name(e->pkg),
- alpm_dep_compute_string(e->optdep));
+ dep_string);
+ free(dep_string);
}
break;
case ALPM_EVENT_DATABASE_MISSING:
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 873ca0ee..65349f57 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -680,7 +680,7 @@ static int setup_libalpm(void)
pm_printf(ALPM_LOG_ERROR, _("failed to initialize alpm library\n(%s: %s)\n"),
alpm_strerror(err), config->dbpath);
if(err == ALPM_ERR_DB_VERSION) {
- pm_printf(ALPM_LOG_ERROR, _(" try running pacman-db-upgrade\n"));
+ fprintf(stderr, _("try running pacman-db-upgrade\n"));
}
return -1;
}
@@ -754,7 +754,7 @@ static int setup_libalpm(void)
ret = alpm_option_add_assumeinstalled(handle, dep);
if(ret) {
- pm_printf(ALPM_LOG_ERROR, _("Failed to pass assume installed entry to libalpm"));
+ pm_printf(ALPM_LOG_ERROR, _("Failed to pass %s entry to libalpm"), "assume-installed");
alpm_dep_free(dep);
return ret;
}
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 36f4414a..f63ac1be 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -284,6 +284,7 @@ void indentprint(const char *str, unsigned short indent, unsigned short cols)
cidx = indent;
if(!p || !len) {
+ free(wcstr);
return;
}
diff --git a/src/util/pacsort.c b/src/util/pacsort.c
index 665f2180..c59ba131 100644
--- a/src/util/pacsort.c
+++ b/src/util/pacsort.c
@@ -227,6 +227,7 @@ static struct input_t *input_new(const char *path, int pathlen)
in->data = strndup(path, pathlen);
if(in->data == NULL) {
+ free(in);
return NULL;
}