Skip to content

Commit

Permalink
oops, forgot to zero that memory out
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Jan 16, 2013
1 parent b794d6f commit 03b2ccd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ext/rblineprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ stackframe_record(stackframe_t *frame, prof_time_t now)
if (srcfile->lines == NULL) {
srcfile->nlines = line + 100;
srcfile->lines = ALLOC_N(sourceline_t, srcfile->nlines);
MEMZERO(srcfile->lines, prof_time_t, srcfile->nlines);
MEMZERO(srcfile->lines, sourceline_t, srcfile->nlines);
}

/* grow the per-line array if necessary */
Expand All @@ -94,7 +94,7 @@ stackframe_record(stackframe_t *frame, prof_time_t now)
srcfile->nlines = line + 100;

REALLOC_N(srcfile->lines, sourceline_t, srcfile->nlines);
MEMZERO(srcfile->lines + prev_nlines, prof_time_t, srcfile->nlines - prev_nlines);
MEMZERO(srcfile->lines + prev_nlines, sourceline_t, srcfile->nlines - prev_nlines);
}

/* record the sample */
Expand Down
2 changes: 1 addition & 1 deletion rblineprof.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'rblineprof'
s.version = '0.2.1'
s.version = '0.2.3'
s.homepage = 'http://github.com/tmm1/rblineprof'

s.authors = 'Aman Gupta'
Expand Down

0 comments on commit 03b2ccd

Please sign in to comment.