Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
subprojects/*
!subprojects/*.wrap

# LSP cache
.cache/

# segfault core file
*/core

Expand Down
5 changes: 4 additions & 1 deletion src/bridge/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,17 +550,20 @@ static struct ahb *debug_driver_probe(struct connection_args *connection)
struct debug *ctx;
int rc;

ctx = malloc(sizeof(*ctx));
ctx = calloc(1, sizeof(*ctx));
if (!ctx) {
return NULL;
}

/* Early abort if no interface at all is defined */
if (connection->interface == NULL) {
logd("No interface for debug provided, skipping...\n");
free(ctx);
return NULL;
}

ctx->force_quit = connection->force_quit;

if (!connection->internet_args) {
/* Local debug interface */
if ((rc = debug_init(ctx, connection->interface)) < 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/devmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ devmem_driver_probe(struct connection_args *connection __unused)
struct devmem *ctx;
int rc;

ctx = malloc(sizeof(*ctx));
ctx = calloc(1, sizeof(*ctx));
if (!ctx) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/ilpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ ilpcb_driver_probe(struct connection_args *connection __unused)
struct ilpcb *ctx;
int rc;

ctx = malloc(sizeof(*ctx));
ctx = calloc(1, sizeof(*ctx));
if (!ctx) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/l2a.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ l2ab_driver_probe(struct connection_args *connection __unused)
struct l2ab *ctx;
int rc;

ctx = malloc(sizeof(*ctx));
ctx = calloc(1, sizeof(*ctx));
if (!ctx) {
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/p2a.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ p2ab_driver_probe(struct connection_args *connection __unused)
struct p2ab *ctx;
int rc;

ctx = malloc(sizeof(*ctx));
ctx = calloc(1, sizeof(*ctx));
if (!ctx) {
return NULL;
}
Expand Down
192 changes: 0 additions & 192 deletions src/cmd/debug.c

This file was deleted.

135 changes: 0 additions & 135 deletions src/cmd/devmem.c

This file was deleted.

Loading
Loading