summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-10-22 17:35:25 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-10-22 17:35:25 +0200
commit9efee359b26d7a54464ff20f38f319216fb248af (patch)
tree7a98efb95f040b065d6c01ac4f7d6177aa788c7a
parente7b4f21ff1311ac0d73368b4e75b59a1165148e4 (diff)
downloadpcitool-9efee359b26d7a54464ff20f38f319216fb248af.tar.gz
pcitool-9efee359b26d7a54464ff20f38f319216fb248af.tar.bz2
pcitool-9efee359b26d7a54464ff20f38f319216fb248af.tar.xz
pcitool-9efee359b26d7a54464ff20f38f319216fb248af.zip
Fix segmentation crash due to uninitialized variable
-rw-r--r--pcilib/property.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pcilib/property.c b/pcilib/property.c
index 7239601..09ed449 100644
--- a/pcilib/property.c
+++ b/pcilib/property.c
@@ -72,7 +72,7 @@ int pcilib_add_properties_from_registers(pcilib_t *ctx, size_t n, const pcilib_r
char *view_name;
pcilib_access_mode_t mode = 0;
- pcilib_register_view_description_t v;
+ pcilib_register_view_description_t v = {0};
pcilib_register_bank_description_t *b = &ctx->banks[banks[i]];
if (registers[i].type == PCILIB_REGISTER_PROPERTY) continue;
@@ -114,6 +114,7 @@ int pcilib_add_properties_from_registers(pcilib_t *ctx, size_t n, const pcilib_r
pcilib_clean_views(ctx, cur_view);
return err;
}
+
/*
pcilib_view_context_t *view_ctx = pcilib_find_view_context_by_name(ctx, v.base.name);
view_ctx->flags |= PCILIB_VIEW_FLAG_PROPERTY;