Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix double free in example
  • Loading branch information
Soeren Sonnenburg committed May 8, 2012
1 parent 9490ebe commit 1306d2d
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -47,15 +47,15 @@ int main(int argc, char** argv)
vec = stream_features->get_vector();

for ( int32_t i = 0 ; i < num_feats ; ++i )
mat[num_vectors*num_feats + i] = vec[i];
mat.matrix[num_vectors*num_feats + i] = vec[i];

num_vectors++;
stream_features->release_example();
}
stream_features->end_parser();

// Create features with the useful values from mat
CDenseFeatures< float64_t >* features = new CDenseFeatures< float64_t >(mat.matrix, num_feats, num_vectors);
CDenseFeatures< float64_t >* features = new CDenseFeatures<float64_t>(mat);

CLabels* labels = new CLabels(num_vectors);
SG_REF(features);
Expand Down

0 comments on commit 1306d2d

Please sign in to comment.